feat: 增加 Sub2API 账号容量运行时控制
This commit is contained in:
@@ -78,7 +78,7 @@
|
||||
- 当前并发是查询时快照,不代表错误发生瞬间并发;没有历史并发证据时,命令必须明确输出不可用,不能据此建议降低并发;
|
||||
- 错误列表没有账号全部路由尝试数时,命令只报告错误数量,不伪造错误率;
|
||||
- Ops 记录与 runtime 日志是独立证据,命令明确披露采样数量,不按日志位置强行关联;
|
||||
- `runtime apply|delete` 支持 `temp-unschedulable` 和 `model-mapping` 两类 runtime 配置;
|
||||
- `runtime apply|delete` 支持临时不可调度与模型映射;`runtime apply` 还支持账号优先级、名称和容量的精准 runtime 更新;
|
||||
- 单账号必须显式使用 `--account`,已知精准批量必须显式使用 `--accounts <id-or-exact-name,...>`,不提供隐式 `all`;
|
||||
- 更新已配置同类 runtime 策略的手工账号时,可显式使用 `--select-configured-policy --account-type apikey` 自动选集,并用 `--exclude-accounts <id-or-exact-name,...>` 排除例外:
|
||||
- 该入口只选择当前 credentials 已存在临时不可调度字段的账号,不把未配置账号自动纳入;
|
||||
@@ -117,6 +117,7 @@ bun scripts/cli.ts platform-infra sub2api codex-pool runtime apply --target PK01
|
||||
bun scripts/cli.ts platform-infra sub2api codex-pool runtime apply --target PK01 --accounts <id-or-exact-name,...> --template <template-id> --confirm
|
||||
bun scripts/cli.ts platform-infra sub2api codex-pool runtime apply --target PK01 --template <template-id> --select-configured-policy --account-type apikey --exclude-accounts <id-or-exact-name,...>
|
||||
bun scripts/cli.ts platform-infra sub2api codex-pool runtime apply --target PK01 --accounts <id-or-exact-name,...> --kind priority --priority <0-1000> --confirm
|
||||
bun scripts/cli.ts platform-infra sub2api codex-pool runtime apply --target PK01 --accounts <id-or-exact-name,...> --kind capacity --capacity <1-100000> --confirm
|
||||
bun scripts/cli.ts platform-infra sub2api codex-pool runtime apply --target PK01 --account <id-or-exact-name> --kind account-name --name <new-name> --confirm
|
||||
bun scripts/cli.ts platform-infra sub2api codex-pool runtime delete --target PK01 --account <name-or-id> --kind temp-unschedulable
|
||||
bun scripts/cli.ts platform-infra sub2api codex-pool runtime apply --target PK01 --account <name-or-id> --kind model-mapping --model <client-model> --upstream-model <upstream-model>
|
||||
@@ -241,6 +242,11 @@ bun scripts/cli.ts platform-infra sub2api codex-pool cleanup-probes --target D60
|
||||
- 数值越小优先级越高,不存在分组级 priority;
|
||||
- 单账号和精准批量都必须先 dry-run,确认写入后逐账号回读并显示 before、desired、actual 与 reconciled;
|
||||
- 只更新账号 priority,不携带 credentials、分组、容量、代理、状态、可调度或临时不可调度字段。
|
||||
- 运行时账号并发保护使用 `runtime apply --kind capacity --capacity <1-100000>`:
|
||||
- 单账号和精准批量账号都必须显式选择,默认 dry-run,确认后顺序写入并逐账号回读;
|
||||
- 只更新 Sub2API 原生账号 `concurrency` 字段,不携带 priority、credentials、分组、代理、状态或可调度字段;
|
||||
- 只有错误时段的并发重建或同等级原生证据表明上游实际并发上限低于本地 capacity 时才收敛,不能用查询时快照代替错误时证据;
|
||||
- YAML-managed 账号的长期容量仍由 owning YAML 管理;未在 YAML 中预配置的手工账号使用该 runtime CRUD,不纳入 YAML profile。
|
||||
- 账号人类可读名称使用 `runtime apply --kind account-name --name <new-name>`:
|
||||
- 只接受单个精确账号 selector,先 dry-run,确认后自动回读名称;
|
||||
- 只更新名称,不携带 credentials、priority、分组、容量、代理、状态或可调度字段。
|
||||
|
||||
Reference in New Issue
Block a user