fix(providers): respect requestFormat for DeepSeek models - #370
Merged
su-fen merged 2 commits intoAug 4, 2026
Conversation
DeepSeek now supports the OpenAI Responses API, but modelFactory still forces deepseek model IDs onto openai-completions. Let requestFormat decide the protocol and keep DeepSeek adapters scoped to the actual completions/anthropic paths.
StackCairn
marked this pull request as draft
August 3, 2026 17:12
Contributor
|
PR governance checks passed. Awaiting human review. |
ISO-N
marked this pull request as ready for review
August 3, 2026 17:27
Contributor
|
测试是不需要的, 可以删去 |
su-fen
approved these changes
Aug 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
关联 Issue
Closes #369
概述
DeepSeek 官方已支持 OpenAI Responses API,但
createModelFromConfig()仍会在模型 ID 含deepseek时强制把请求路由到openai-completions,忽略用户显式选择的requestFormat。本 PR 删除这个强制路由。对
codex供应商来说,requestFormat现在决定openai-responses还是openai-completions,与 Qwen、GLM、Kimi、MiniMax、OpenRouter 等 OpenAI 兼容供应商行为一致。DeepSeek 专有适配仅在最终模型 API 为openai-completions或anthropic-messages时生效。文档:N/A。本改动是让实际请求回归用户已配置的
requestFormat,没有新增或修改面向用户的文档。变更范围
crates/agent-gui/src/lib/providers/runtime/modelFactory.tscrates/agent-gui/src/lib/providers/deepSeekProviderAdapter.tscrates/agent-gui/test/providers/request-options.test.mjs:删除因行为变更失效的 DeepSeek request-format 测试截图 / 预览
验证
cd crates/agent-gui && node --test test/providers/*.test.mjs-> 228 通过cd crates/agent-gui && pnpm exec tsc --noEmit-> 通过提交前检查