修复公开模型目录测试遗漏协议字段
Project CI / AI game creator shell Rust crates (push) Successful in 1m43s
Project CI / AI game creator shell Rust smoke (push) Successful in 2m34s
Project CI / Backend tests (push) Successful in 5m23s
Project CI / Native shell tests (push) Successful in 6m24s
Project CI / Frontend tests (push) Successful in 2m21s
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 10m57s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 11m21s
Project CI / AI game creator shell web tests (push) Successful in 1m54s
Project CI / Repository checks (push) Successful in 2m23s
Project CI / AI game creator shell Rust crates (push) Successful in 1m43s
Project CI / AI game creator shell Rust smoke (push) Successful in 2m34s
Project CI / Backend tests (push) Successful in 5m23s
Project CI / Native shell tests (push) Successful in 6m24s
Project CI / Frontend tests (push) Successful in 2m21s
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 10m57s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 11m21s
Project CI / AI game creator shell web tests (push) Successful in 1m54s
Project CI / Repository checks (push) Successful in 2m23s
补齐公开模型目录完整 JSON 断言中的 protocol 字段。 同步后端契约文档中的回归验证说明。 验证模型目录定向测试、编码检查、文档索引和 Rust 格式检查通过。
This commit is contained in:
@@ -537,6 +537,7 @@ Responses 的终态载荷既是工具调用的恢复源,也是正文的恢复
|
||||
- `read_agc_model_catalog` / `save_agc_model_catalog` 只接受已登记的 runtime service identity,保存使用 revision 乐观锁;缺行时读取返回 `AGC_MODEL_CATALOG_NOT_INITIALIZED`,不返回任何内置目录。
|
||||
- 目录初始值来自上游同步:api-server(API/All 角色)启动时若目录缺失、结构与当前定义不符或校验不通过,就用分组定价列表 `GET {Router 控制面}/api/pricing?group=taonier`(公开只读、不带凭据)的 `data[].model_name` 生成目录(`id` 为模型名 slug,`alias`/`modelId` 为上游原名),失败只记录 error、不写替代目录,由下一次启动重试;未初始化期间 AGC 目录与对话接口、后台目录接口都失败关闭(`503`)。
|
||||
- 后台 owner 通过 `GET/PUT /admin/api/agc-models` 管理稳定标识、必填别名、实际模型名、启用状态、默认项,以及**执行器 `agentMode` 与线协议 `protocol` 两个正交维度**:`agentMode` 只取 `codex` / `cc`,`protocol` 只取 `openai_responses` / `openai_chat` / `anthropic`,合法组合封闭(codex ⇒ responses/chat,cc ⇒ anthropic),非法组合在保存与加载两侧都失败关闭;存量目录缺 `protocol` 时按执行器推导。客户端 `GET /api/llm/models` 返回启用项的稳定标识、别名、`agentMode`、解析后的 `protocol` 和目录 `revision`(供条件刷新,不暴露实际模型名)。
|
||||
- 公开目录回归测试 `llm::model_catalog_tests::public_catalog_exposes_stable_id_and_upstream_alias` 对完整模型 JSON 做相等断言,包含默认 Codex 模型的 `protocol: "openai_responses"`;调整返回字段时同步更新该断言,并保留禁用项过滤和内部字段不下发的验证。
|
||||
- Responses / Chat 请求按目录解析模型;未知或停用项拒绝。AGC 的 `platform-default` 请求标识使用目录默认项。详细契约见 `technical/【技术方案】AGC后台模型别名与对话选择-2026-09-05.md`。
|
||||
|
||||
### `error_report`
|
||||
|
||||
@@ -48,7 +48,7 @@ mod model_catalog_tests {
|
||||
// 客户端拿到稳定标识 + 别名(别名就是上游原始模型名),实际模型名不下发。
|
||||
assert_eq!(
|
||||
payload["models"],
|
||||
json!([{"id": "gpt-5-6-sol", "displayName": "gpt-5.6-sol", "agentMode": "codex"}])
|
||||
json!([{"id": "gpt-5-6-sol", "displayName": "gpt-5.6-sol", "agentMode": "codex", "protocol": "openai_responses"}])
|
||||
);
|
||||
assert_eq!(payload["defaultModelId"], "gpt-5-6-sol");
|
||||
assert_eq!(payload["revision"], json!(7));
|
||||
|
||||
Reference in New Issue
Block a user