关于Cluade code Desktop配置deepseek提示Gateway deployments require an Anthropic model解决方法
关于Cluade code Desktop配置deepseek提示Gateway deployments require an Anthropic model解决方法
关于Cluade code Desktop配置deepseek提示Gateway deployments require an Anthropic model解决方法
最近我在用 Claude Code Desktop 的时候遇到一个问题。
Claude 现在收紧了一些策略,Desktop 端打开开发者模式以后,虽然可以配置第三方的 url 和 key,但是不能直接设置模型。
我想接 DeepSeek,但是会遇到类似这种报错:
Gateway deployments require an Anthropic model
或者用 LiteLLM 中转的时候,还可能遇到:
API Error: 400
The `reasoning_content` in the thinking mode must be passed back to the API.
简单说就是:Claude Code Desktop 会按自己的方式发请求,模型名、thinking 参数、token 统计这些东西不一定符合 DeepSeek 或其他第三方接口的要求。
所以我写了一个小工具:UpstreamKit。
这个工具是干什么的
UpstreamKit 是一个本地 API 中转工具。
它的作用就是在 Claude Code Desktop 和 DeepSeek 之间加一层本地代理。
Claude Code Desktop 请求本地地址,然后 UpstreamKit 再把请求转发到你配置的 DeepSeek 接口。
这样就可以解决 Claude Code Desktop 不能设置模型的问题。
它能做什么
- 可以在 GUI 里填上游
url - 可以填上游
key - 可以选择
openai或anthropic - 可以设置真正请求 DeepSeek 的模型
- 可以一键测试配置是否可用
- 可以启动本地中转地址
- 可以显示详细日志
- 可以统计 token
- 可以隐藏到系统托盘后台运行
- 会记住上次填写的配置
下载
项目地址:
https://github.com/Ltb2539/UpstreamKit
下载 exe:
https://github.com/Ltb2539/UpstreamKit/releases
怎么用
打开 UpstreamKit.exe。
然后填写:
上游 URL:https://api.deepseek.com/anthropic
上游 Key:你的 DeepSeek key
上游类型:anthropic
上游模型(实际请求):deepseek-v4-pro
本地端口:8787
先点一下 测试。
如果日志里显示 HTTP 200,说明 url、key、模型基本没问题。
然后点击 运行。
下面会显示一个本地地址,比如:
http://127.0.0.1:8787
然后去 Claude Code Desktop 的开发者模式里配置:
Base URL:http://127.0.0.1:8787
API Key:随便填,或者留空
因为真正的 key 和模型是在 UpstreamKit 里配置的。
Claude Code Desktop 传过来的 key 和 model 会被中转工具忽略。
为什么能解决
Claude Code Desktop 自己不能设置模型。
但是它发请求的时候,最终还是要经过一个 API 地址。
UpstreamKit 就是把这个 API 地址换成本地地址。
然后在本地中转的时候,把模型改成你 GUI 里填的模型。
也就是说:
Claude Code Desktop -> UpstreamKit -> DeepSeek
Claude Code Desktop 不知道后面真正请求的是哪个模型。
但是 DeepSeek 收到请求的时候,模型已经被 UpstreamKit 改成你配置的模型了。
更多推荐


所有评论(0)