mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-17 08:14:16 +00:00
Merge pull request #308 from kaitranntt/kai/fix/delegation-dynamic-profiles
fix(doctor): use dynamic profile discovery for delegation check
This commit is contained in:
2 files changed
+5
-11
No files matched your search
@@ -38,13 +38,14 @@ jobs:
|
|||||||
|
|
||||||
# Conditions:
|
# Conditions:
|
||||||
# - PR event: only on opened (not synchronize to avoid cancel-on-push)
|
# - PR event: only on opened (not synchronize to avoid cancel-on-push)
|
||||||
# - Comment event: only if it's a PR and contains /review
|
# - Comment event: only if it's a PR, contains /review, and NOT from a bot
|
||||||
if: >
|
if: >
|
||||||
github.event_name == 'pull_request_target' ||
|
github.event_name == 'pull_request_target' ||
|
||||||
github.event_name == 'workflow_dispatch' ||
|
github.event_name == 'workflow_dispatch' ||
|
||||||
(github.event_name == 'issue_comment' &&
|
(github.event_name == 'issue_comment' &&
|
||||||
github.event.issue.pull_request &&
|
github.event.issue.pull_request &&
|
||||||
contains(github.event.comment.body, '/review'))
|
contains(github.event.comment.body, '/review') &&
|
||||||
|
github.event.comment.user.type != 'Bot')
|
||||||
|
|
||||||
# CLIProxy environment for model routing
|
# CLIProxy environment for model routing
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -193,16 +193,9 @@ export class DelegationChecker implements IHealthChecker {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check profile validity using DelegationValidator
|
// Check profile validity using DelegationValidator (dynamic discovery)
|
||||||
const { DelegationValidator } = require('../../utils/delegation-validator');
|
const { DelegationValidator } = require('../../utils/delegation-validator');
|
||||||
const readyProfiles: string[] = [];
|
const readyProfiles = DelegationValidator.getReadyProfiles();
|
||||||
|
|
||||||
for (const profile of ['glm', 'kimi']) {
|
|
||||||
const validation = DelegationValidator.validate(profile);
|
|
||||||
if (validation.valid) {
|
|
||||||
readyProfiles.push(profile);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (readyProfiles.length === 0) {
|
if (readyProfiles.length === 0) {
|
||||||
spinner.warn();
|
spinner.warn();
|
||||||
|
|||||||
Reference in new issue
Block a user