Claude Desktop 第三方推理需要 Anthropic-compatible Gateway。DeerAPI 通过 Claude 消息接口支持 Claude 模型调用。
前置条件
- 已安装 Claude Desktop
- Claude Desktop 版本包含 Developer mode 和 Configure third-party inference
- 已开通 DeerAPI 并拥有 API Key
- DeerAPI 账号具备 Claude 模型调用权限
- 本机网络可访问
https://api.deerapi.com
配置 Claude Desktop
启用开发者模式
打开 Claude Desktop,停留在登录页。在应用菜单中打开 Help → Troubleshooting,然后选择 Enable Developer Mode。Windows 登录页上菜单不易点击时,先聚焦邮箱输入框,按
Tab 切到菜单区域,再按 Enter 打开菜单。打开第三方推理配置
启用开发者模式后,打开 Developer → Configure third-party inference。配置窗口左侧会显示多个栏目。DeerAPI 相关字段集中在 Connection 栏目。
配置 Gateway
在 Connection 栏目中填写以下值:
Base URL 按表格填写。Claude Desktop 要求 Gateway 使用 HTTPS。下图展示了已填写 DeerAPI 参数的 Connection 页面。
| 字段 | 填写值 |
|---|---|
| Inference provider | Gateway |
| Gateway | Anthropic-compatible |
| Gateway base URL | https://api.deerapi.com |
| Gateway API key | 你的 DeerAPI API Key,例如 <DEERAPI_KEY> |
| Gateway auth scheme | Bearer |
| Gateway extra headers | 留空 |

添加模型 ID
在 Model list 中手动添加以下模型 ID:
列表中的第一项会作为默认模型。如果希望使用通用默认模型,可将 
| 模型 ID | 建议用途 |
|---|---|
claude-opus-4-7 | 复杂规划与 Agent 任务 |
claude-sonnet-4-6 | 日常桌面使用 |
claude-haiku-4-5-20251001 | 轻量提示词与草稿 |
claude-sonnet-4-6 放在第一项。下图展示了已添加三个 Claude 模型 ID 的 Model list 页面。
验证配置
使用不依赖外部工具的短提示词验证:
常见问题
找不到 Developer 菜单
找不到 Developer 菜单
确认已经选择 Help → Troubleshooting → Enable Developer Mode。然后完全退出 Claude Desktop,再重新打开。如果仍然没有该选项,安装包含第三方推理配置能力的 Claude Desktop 版本。
配置后仍进入普通登录流程
配置后仍进入普通登录流程
逐项检查以下配置:
- Inference provider 已设置为 Gateway。
- Gateway base URL 是
https://api.deerapi.com。 - Gateway API key 中的 DeerAPI API Key 没有多余空格。
- 已点击 Apply locally,并完全重启 Claude Desktop。
连接验证失败
连接验证失败
确认 Base URL 以
https:// 开头。Claude Desktop 不接受 HTTP Gateway URL。同时确认 DeerAPI 账号具备 Claude 模型调用权限,且 API Key 没有被删除或停用。模型不显示
模型不显示
重新打开 Developer → Configure third-party inference,检查 Model list 中的模型 ID。每个模型 ID 需要单独添加。不要在 UI 字段中加入引号、逗号或多余空格。
OpenAI-compatible Base URL 无法使用
OpenAI-compatible Base URL 无法使用
这个流程需要 Anthropic-compatible Gateway。使用
https://api.deerapi.com 和上文列出的 Claude 模型 ID。Code 标签页行为不一致
Code 标签页行为不一致
Code 标签页使用 Claude Desktop 内嵌的 Claude Code 引擎。部分桌面配置在 Code 会话中的表现可能与 Cowork 不一致。如果需要在终端中使用 Claude Code,参考 Claude Code 集成指南。