Skip to content

Fix DeepSeek response_format fallback and add AI interface modes - #106

Merged
zyk1172 merged 12 commits into
mainfrom
fix/deepseek-api-interface-modes
Oct 1, 2026
Merged

zyk1172 merged 12 commits into
mainfrom
fix/deepseek-api-interface-modes

Conversation

@zyk1172

@zyk1172 zyk1172 commented Oct 1, 2026

Copy link
Copy Markdown
Owner

变更

  • 修复 DeepSeek / 兼容网关返回 This response_format type is unavailable now 时没有触发降级的问题。
  • structured output 现在按 json_schema -> json_object -> 纯 Prompt 自动降级,并缓存可用模式。
  • 新增 Provider 级“接口类型”:兼容接口 / 原生接口。
    • 兼容接口固定按 OpenAI Chat Completions 协议发送,适用于中转、聚合和兼容 API。
    • 原生接口保留每个模型的协议选择(Chat Completions / Responses / Anthropic Messages)。
  • 旧配置缺少接口类型时按原生模式迁移,避免已配置 Responses/Anthropic 的用户升级后被静默改成 Chat Completions。
  • 离线翻译也使用同一套接口类型解析,避免实时/离线请求协议不一致。
  • 增加 DeepSeek 精确报错回归测试、接口类型协议路由测试和旧配置迁移测试。

预期结果

截图中的 HTTP 400, This response_format type is unavailable now 不再直接终止翻译;同一模型会自动去掉不支持的 structured-output 参数后继续请求。

@zyk1172
zyk1172 merged commit 8758d97 into main Oct 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant