分类: DeepAI Agent 接入

DeepAI API 中转站接入 Claude Code、Codex、CC Switch、第三方 Agent 和多模型客户端教程。

Hermes agent deepai responses empty tool name 400.png

Hermes Agent 接入 DeepAI API 中转站:Responses API 空工具名 input[n].name 400 排查Hermes Agent 接入 DeepAI API 中转站:Responses API 空工具名 input[n].name 400 排查

Hermes Agent 使用 custom GPT-5 OpenAI-compatible 网关时,多轮会话可能因历史里出现空 function_call.name 或空 tool_call_id,触发 Responses API 400:Invalid input[n].name empty string。本文结合 Hermes Agent Issue #11411,整理 DeepAI API 中转站日志、工具调用历史清洗和协议选择排查方法。

Openclaw deepai tool calls not executed.png

OpenClaw 接入 DeepAI API 中转站:返回 tool_calls 但工具不执行的排查OpenClaw 接入 DeepAI API 中转站:返回 tool_calls 但工具不执行的排查

OpenClaw 使用自定义 OpenAI-compatible Provider 时,直接 curl 能返回合法 tool_calls,但 Agent 只用自然语言回应,write、exec 等本地工具没有执行。本文结合 OpenClaw Issue #67745,整理 DeepAI API 中转站日志、tool_choice、finish_reason 与客户端工具调度的分层排查方法。

Claude code deepai mcp empty params serialization.png

Claude Code 接入 DeepAI API 中转站:MCP 工具参数变成空对象 {} 的排查Claude Code 接入 DeepAI API 中转站:MCP 工具参数变成空对象 {} 的排查

Claude Code 使用 MCP 工具时,如果工具被调用但 MCP Server 收到的 arguments 变成 {},不要只排查 API 中转站。本文结合 anthropics/claude-code Issue #3966,讲清如何区分 DeepAI API 中转站请求、模型 tool use、Claude Code MCP 参数序列化和 MCP Server schema 四个层面。

Cherry studio deepai mcp function calling model.png

Cherry Studio 接入 DeepAI API 中转站:MCP 不显示或不调用的 function calling 排查Cherry Studio 接入 DeepAI API 中转站:MCP 不显示或不调用的 function calling 排查

Cherry Studio 配好 MCP Server 后工具按钮不显示、MCP 没被调用,常见原因是输入框未启用 MCP,或模型没有被识别为 function calling 模型。本文结合 Cherry Studio Issue #3513 和 MCP 文档,整理 DeepAI API 中转站接入时的模型能力、tools 透传与日志排查方法。

N8n ai agent deepai custom base url mcp tools fail.png

n8n AI Agent 接入 DeepAI API 中转站:自定义 Base URL 下 MCP/Tools 失败排查n8n AI Agent 接入 DeepAI API 中转站:自定义 Base URL 下 MCP/Tools 失败排查

n8n AI Agent 使用 OpenAI-compatible 自定义 Base URL 时,普通聊天能跑通,但连接 MCP Client 或 Tools 后失败,常见原因不是 Key 错,而是模型工具调用能力、tools 参数、streaming 与中转站透传不完整。本文结合 n8n Issue #15862 与官方文档整理排查路径。

Codex cli deepai openai base url ignored config.png

Codex CLI 接入 DeepAI API 中转站:openai_base_url 不生效仍访问 api.openai.com 的排查Codex CLI 接入 DeepAI API 中转站:openai_base_url 不生效仍访问 api.openai.com 的排查

Codex CLI 配置 DeepAI API 中转站或其他 OpenAI-compatible endpoint 后,仍然请求 api.openai.com,通常不是中转站失效,而是 openai_base_url、model_provider 或 model_providers 写错了配置层级。本文结合 openai/codex Issue #16719 与官方 config.toml 文档,整理可复现排查步骤。

Codex cli deepai responses api missing reasoning item.png

Codex CLI 接入 DeepAI API 中转站:Responses API 缺 reasoning item 导致第二轮 400Codex CLI 接入 DeepAI API 中转站:Responses API 缺 reasoning item 导致第二轮 400

Codex CLI 通过自定义 Responses API Provider 或 Azure/中转站调用 GPT-5 Codex 时,如果第一轮成功、第二轮报 message missing reasoning item,通常是 response item 与 reasoning item 没有被完整保存和回放。本文结合 openai/codex Issue #6375、#5990 与 PR #3528,整理 DeepAI API 中转站场景下的排查与修复方法。

Claude code deepai anthropic base url v1 messages.png

Claude Code 接入 DeepAI API 中转站:ANTHROPIC_BASE_URL 与 /v1/messages 怎么配置Claude Code 接入 DeepAI API 中转站:ANTHROPIC_BASE_URL 与 /v1/messages 怎么配置

Claude Code 支持通过 ANTHROPIC_BASE_URL 接入 LLM Gateway,但它需要 Anthropic API 格式的 /v1/messages,而不是普通 OpenAI-compatible /v1/chat/completions。本文结合 Claude Code Issue #216、官方 LLM Gateway 文档和 OAuth 覆盖问题,整理 DeepAI API 中转站场景下的接入与排查方法。

Openclaw deepai developer role 400 system role.png

OpenClaw 接入 DeepAI API 中转站:developer role 400 错误怎么修OpenClaw 接入 DeepAI API 中转站:developer role 400 错误怎么修

OpenClaw 通过 OpenAI-compatible Provider 接入 Qwen、DeepSeek、GLM、Kimi 或代理网关时,如果后端返回 developer is not one of system/user/assistant/tool/function,通常是 developer role 没有映射为 system。本文结合 OpenClaw Issue #27037 和 PR #29479,整理 DeepAI API 中转站场景下的排查与修复方法。

Openclaw deepai openai completions tools parameter.png

OpenClaw 接入 DeepAI API 中转站:openai-completions 不发送 tools 导致工具调用失效OpenClaw 接入 DeepAI API 中转站:openai-completions 不发送 tools 导致工具调用失效

OpenClaw 使用自定义 OpenAI-compatible Provider 时,如果请求里没有 tools 参数,模型可能只输出 JSON 文本而不会返回 tool_calls。本文结合 OpenClaw Issue #1866 / #8923,整理 DeepAI API 中转站场景下的复现、排查、升级和验证方法。

Openclaw deepai stream true sse wrapper no display.png

OpenClaw 接入 DeepAI API 中转站:stream=true 返回单个 JSON 导致界面不显示怎么修OpenClaw 接入 DeepAI API 中转站:stream=true 返回单个 JSON 导致界面不显示怎么修

OpenClaw openai-completions Provider 默认发送 stream:true,如果自定义 OpenAI-compatible model-router 只返回单个 chat.completion JSON,界面可能沉默不显示。本文结合 OpenClaw Issue #14262,说明为什么 stream:true 必须返回 text/event-stream SSE chunk,以及 DeepAI API 中转站/自建代理如何同时兼容流式和非流式响应。

Openclaw deepai parallel tool calls 400 single tool call.png

OpenClaw 接入 DeepAI API 中转站:parallel_tool_calls 导致工具调用 400 怎么排查OpenClaw 接入 DeepAI API 中转站:parallel_tool_calls 导致工具调用 400 怎么排查

OpenClaw v2026.3.2 曾向所有 OpenAI-compatible Provider 强制发送 parallel_tool_calls:true,导致只支持单工具调用的模型返回 400 并让工具全部失效。本文结合 OpenClaw Issue #37048 和 PR #39356,整理 DeepAI API 中转站场景下如何识别、禁用和验证 parallel_tool_calls。