Remove DeepSeek default protocol override

This commit is contained in:
Jason Xu committed 2026-08-22 23:24:20 +08:00
1 parent 948ef0be11
commit 25885c4e25
2 files changed
-8

No files matched your search

-2
View File
@@ -319,8 +319,6 @@ socks5://127.0.0.1:1080 # 备用代理
模型同时存在于 Zen 与 Go 时按 `prefer` 配置排列认证 Key 顺序:值为 `go` 时先 Go 后 Zen,值为 `zen` 时先 Zen 后 Go(默认 `go`)。首选 Tier 失败后才回退另一 Tier;仅存在于某一池时只使用该池的 key。免费模型在这条认证顺序之前额外尝试匿名 Zen。
`deepseek-v4-flash-free` 默认使用 Chat 原生协议。与所有模型一样,`models.protocols` 中的显式映射优先于该默认值和名称推断。
### Thinking 工具历史兼容
所有请求都会经过同一个上游请求准备流程,同协议转发和跨协议转换不再使用两套分支。通过 Chat Completions 或 Anthropic Messages API 调用 DeepSeek、Kimi/Moonshot 或 MiMo 模型时,代理会按上游的目标协议规范化 assistant 工具历史:Chat 补全缺失或空的 `reasoning_content`;Anthropic 保留有效 thinking 文本、为缺失或空的 thinking 补充兼容占位内容、将 `redacted_thinking` 转为普通 thinking,并移除这些兼容端点不接受的 `signature`。显式启用 reasoning/thinking 的别名模型也会启用该处理,普通非 reasoning 请求不会被修改。
-6
View File
@@ -253,12 +253,6 @@ func toSet(items []string) map[string]bool {
func inferProtocol(model string) Protocol {
m := strings.ToLower(model)
// This compatibility model speaks Chat Completions despite being exposed
// beside models whose names can imply newer OpenAI-style protocols. An
// explicit models.protocols entry is resolved before this default.
if m == "deepseek-v4-flash-free" {
return ProtocolChat
}
for _, prefix := range []string{"claude-", "qwen"} {
if strings.HasPrefix(m, prefix) {
return ProtocolAnthropic