-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
area:coreCore runtime and session stateCore runtime and session stateneeds-triageIssue needs initial triageIssue needs initial triage
Description
背景
当前 core 侧已迁移到 AI SDK,但不同供应商的 API 形态存在差异(例如 OpenAI responses vs chat/completions,Anthropic messages,Gemini generateContent)。
目标
建立明确的模型适配层与配置类型,让每个 provider/model 能声明应走哪类 wire API,减少 404/参数不兼容问题。
建议方案
- 新增配置字段(示例):
wire_api/api_format - 至少覆盖:
openai_responsesopenai_chat_completionsanthropic_messagesgemini_generate_content
- 在运行时根据该字段选择对应 provider/model 构造方式。
- 对未知组合给出明确报错(含 provider/model/api_format)。
验收标准
- 配置层可显式声明 API 格式并通过类型校验。
- OpenAI-compatible 服务可稳定切换
responses与chat/completions。 - 补充回归测试:配置分支、错误分支、默认行为。
关联
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:coreCore runtime and session stateCore runtime and session stateneeds-triageIssue needs initial triageIssue needs initial triage