修复(LLM目录契约): protocol 缺省改为按 agent_mode 推导

- LlmModelSummary/LlmUnavailableModel 反序列化缺失 protocol 时取 agent_mode 的默认协议,不再一律 openai_responses
- 补 cc / anthropic 别名 / 显式 protocol 用例;同步生成绑定注释
This commit is contained in:
2026-10-05 12:18:05 +08:00
parent 7579213bea
commit c7150b590c
3 changed files with 106 additions and 5 deletions
+1 -1
View File
@@ -11,6 +11,6 @@ export type LlmModelSummary = { displayName: string, id: string,
*/
agentMode: AgcAgentMode,
/**
* 上游线协议;旧服务端缺字段时按 `openai_responses` 兼容。
* 上游线协议;旧服务端缺字段时按 `agent_mode` 的默认协议兼容。
*/
protocol: AgcModelProtocol, };
@@ -6,4 +6,8 @@ import type { LlmModelUnavailableReason } from "./LlmModelUnavailableReason";
/**
* 目录里存在、但当前账号不可用的一条模型。字段与 [`LlmModelSummary`] 对齐,另带原因。
*/
export type LlmUnavailableModel = { displayName: string, id: string, agentMode: AgcAgentMode, protocol: AgcModelProtocol, reason: LlmModelUnavailableReason, };
export type LlmUnavailableModel = { displayName: string, id: string, agentMode: AgcAgentMode,
/**
* 上游线协议;旧服务端缺字段时按 `agent_mode` 的默认协议兼容。
*/
protocol: AgcModelProtocol, reason: LlmModelUnavailableReason, };