资讯动态

DeepSeek-Reasonix 预设协议地址核对指南:Chat Completions、Responses 与 Anthropic Messages 端点全解析

发布时间:2026/9/12 10:16:13 来源:尧图企业网站定制
DeepSeek-Reasonix 预设协议地址核对指南Chat Completions、Responses 与 Anthropic Messages 端点全解析【免费下载链接】DeepSeek-ReasonixDeepSeek-native AI coding agent for your terminal. Engineered around prefix-cache stability — leave it running.项目地址: https://gitcode.com/GitHub_Trending/de/DeepSeek-Reasonix导读本文以 DeepSeek-Reasonix 仓库中的 预设协议地址核对文档 为骨架完整梳理了当前仓库为各模型提供商Provider官方文档核对过的 SDK Base URL覆盖 Chat Completions、Responses、Anthropic Messages 三种协议并深入讲解这些端点数据在源码中的落地方式从 provider_protocol_endpoints.json 可执行清单、ProviderProtocolEndpoint 结构体到ProtocolEndpointsForCatalog装配进 Provider Catalog 的完整链路。读完本文你将掌握如何核对与使用预设端点、理解authHeader、responsesMode、checkedOn等元数据字段的真实含义以及如何区分「官方文档核对」与「真实密钥连通测试」的边界。一、这份文档是什么预设协议地址的权威核对表DeepSeek-Reasonix 是一个面向终端的多提供商 AI 编码代理。为了让用户在配置模型提供商时能拿到开箱即用的 Base URL仓库维护了一张「预设协议地址核对表」记录了每家提供商官方文档确认过的 SDK Base URL。这份文档本质上是元数据核对清单而不是密钥连通测试报告。文档开篇就做了三点关键声明官方文档核对不等于真实密钥连通测试表格内容仅代表「官方文档中记载的地址」不代表使用真实 API Key 做过端到端连通验证空缺表示未确认仍允许手动配置表格中某一行是「—」只说明该协议地址尚未被核对确认用户仍可自行手动填写该提供商的地址进行配置已有连接不迁移这些核对结果不会覆盖或迁移用户已经保存的 Provider 连接避免打断线上环境。此外还有一个非常重要的格式约定Base URL excludes the request suffixChat /chat/completionsResponses /responsesAnthropic /v1/messages。也就是说表格中的每个地址都是不含请求后缀的 SDK 级 Base URL。例如 DeepSeek 的 Chat Completions 端点记录为https://api.deepseek.com/v1真正的请求路径是在其后再拼接/chat/completions。三种协议、四种产品形态核对表的纵轴是「提供商 | 区域 | 产品」三元组横轴是三种协议Chat CompletionsopenaiOpenAI 兼容的/chat/completions协议ResponsesresponsesOpenAI Responses API 协议DeepSeek 等提供商通过该协议提供无状态stateless推理Anthropic MessagesanthropicAnthropic 兼容的/v1/messages协议Claude 系工具链可直接接入。产品形态Product通常为api标准 API、coding编程套餐/编码计划、tokenToken 套餐与local本机服务四类。区域Region则分为cn、global、local以及少量地域专属值如 MiMo 的ams、sgp。二、完整端点核对表以下为文档中完整记录的预设协议地址地址均为文档核对值空缺行表示该协议地址未被核对确认仍允许手动配置Scope提供商|区域|产品Chat CompletionsResponsesAnthropic Messagesamd|cn|apihttps://developer.amd.com.cn/radeon/api/v1——anthropic|global|api——https://api.anthropic.combaidu|cn|apihttps://qianfan.baidubce.com/v2—https://qianfan.baidubce.com/anthropiccerebras|global|apihttps://api.cerebras.ai/v1——deepseek|global|apihttps://api.deepseek.com/v1https://api.deepseek.comhttps://api.deepseek.com/anthropicdoubao|cn|apihttps://ark.cn-beijing.volces.com/api/v3https://ark.cn-beijing.volces.com/api/v3—fireworks|global|apihttps://api.fireworks.ai/inference/v1https://api.fireworks.ai/inference/v1https://api.fireworks.ai/inferencegemini|global|apihttps://generativelanguage.googleapis.com/v1beta/openai——gmi|global|apihttps://api.gmi-serving.com/v1——groq|global|apihttps://api.groq.com/openai/v1https://api.groq.com/openai/v1—huggingface|global|apihttps://router.huggingface.co/v1https://router.huggingface.co/v1—kilocode|global|apihttps://api.kilo.ai/api/gateway——kimi|cn|apihttps://api.moonshot.cn/v1——kimi|global|apihttps://api.moonshot.ai/v1——kimi|global|codinghttps://api.kimi.com/coding/v1—https://api.kimi.com/coding/lmstudio|local|localhttp://localhost:1234/v1http://localhost:1234/v1http://localhost:1234longcat|global|apihttps://api.longcat.chat/openai/v1—https://api.longcat.chat/anthropicmimo|ams|tokenhttps://token-plan-ams.xiaomimimo.com/v1—https://token-plan-ams.xiaomimimo.com/anthropicmimo|cn|tokenhttps://token-plan-cn.xiaomimimo.com/v1https://token-plan-cn.xiaomimimo.com/v1https://token-plan-cn.xiaomimimo.com/anthropicmimo|global|apihttps://api.xiaomimimo.com/v1https://api.xiaomimimo.com/v1https://api.xiaomimimo.com/anthropicmimo|sgp|tokenhttps://token-plan-sgp.xiaomimimo.com/v1—https://token-plan-sgp.xiaomimimo.com/anthropicminimax|cn|apihttps://api.minimaxi.com/v1—https://api.minimaxi.com/anthropicminimax|global|apihttps://api.minimax.io/v1—https://api.minimax.io/anthropicmistral|global|apihttps://api.mistral.ai/v1——modelscope|global|apihttps://api-inference.modelscope.cn/v1——novita|global|apihttps://api.novita.ai/openai/v1—https://api.novita.ai/anthropicnvidia|global|apihttps://integrate.api.nvidia.com/v1——ollama|global|apihttps://ollama.com/v1——ollama|local|localhttp://localhost:11434/v1http://localhost:11434/v1http://localhost:11434openai|global|apihttps://api.openai.com/v1https://api.openai.com/v1—opencode|global|gohttps://opencode.ai/zen/go/v1https://opencode.ai/zen/go/v1https://opencode.ai/zen/goopencode|global|zenhttps://opencode.ai/zen/v1https://opencode.ai/zen/v1https://opencode.ai/zenopenrouter|global|apihttps://openrouter.ai/api/v1https://openrouter.ai/api/v1https://openrouter.ai/apippio|cn|apihttps://api.ppio.com/openai—https://api.ppio.com/anthropicqiniu|cn|apihttps://api.qnaigc.com/v1—https://api.qnaigc.comqwen|cn|apihttps://dashscope.aliyuncs.com/compatible-mode/v1https://dashscope.aliyuncs.com/compatible-mode/v1https://dashscope.aliyuncs.com/apps/anthropicqwen|cn|codinghttps://coding.dashscope.aliyuncs.com/v1—https://coding.dashscope.aliyuncs.com/apps/anthropicqwen|global|apihttps://dashscope-intl.aliyuncs.com/compatible-mode/v1https://dashscope-intl.aliyuncs.com/compatible-mode/v1—qwen|global|codinghttps://coding-intl.dashscope.aliyuncs.com/v1—https://coding-intl.dashscope.aliyuncs.com/apps/anthropicscnet|global|tokenhttps://api.scnet.cn/api/llm/v1—https://api.scnet.cn/api/llm/anthropicsiliconflow|cn|apihttps://api.siliconflow.cn/v1—https://api.siliconflow.cnstepfun|global|apihttps://api.stepfun.com/v1—https://api.stepfun.comstepfun|global|codinghttps://api.stepfun.com/step_plan/v1—https://api.stepfun.com/step_plantogether|global|apihttps://api.together.ai/v1——token-rhythm|global|apihttps://tokenrhythm.studio/v1—https://tokenrhythm.studiovercel-ai-gateway|global|apihttps://ai-gateway.vercel.sh/v1https://ai-gateway.vercel.sh/v1https://ai-gateway.vercel.shxai|global|apihttps://api.x.ai/v1https://api.x.ai/v1—zai|cn|apihttps://open.bigmodel.cn/api/paas/v4—https://open.bigmodel.cn/api/anthropiczai|cn|codinghttps://open.bigmodel.cn/api/coding/paas/v4—https://open.bigmodel.cn/api/anthropiczai|global|apihttps://api.z.ai/api/paas/v4——zai|global|codinghttps://api.z.ai/api/coding/paas/v4—https://api.z.ai/api/anthropic三、端点数据在源码中的落地从 JSON 清单到运行时3.1 可执行的事实来源provider_protocol_endpoints.json文档在 Notes 中明确指出The executable source of truth is internal/config/provider_protocol_endpoints.json. Sources and checkedOn are stored per route.也就是说这份中文核对文档只是「人读视图」真正被程序加载执行的权威清单是 internal/config/provider_protocol_endpoints.json。每个端点条目都包含四个字段以deepseek|global|api为例deepseek|global|api: { openai: { baseUrl: https://api.deepseek.com/v1, source: https://api-docs.deepseek.com/, checkedOn: 2026-09-07 }, responses: { baseUrl: https://api.deepseek.com, source: https://api-docs.deepseek.com/, checkedOn: 2026-09-07 }, anthropic: { baseUrl: https://api.deepseek.com/anthropic, source: https://api-docs.deepseek.com/guides/anthropic_api, checkedOn: 2026-09-08 } }字段含义baseUrl文档核对的 SDK Base URL不含请求后缀source官方文档出处用于审计时追溯核对依据checkedOn核对日期标注该条目的时效性authHeader可选标记该 Anthropic 兼容网关期望使用Authorization: Bearer头而不是 Anthropic 默认的x-api-key头responsesMode可选标注 Responses API 的上下文策略仓库中出现过的值为stateless。3.2 Go 侧的结构体与加载逻辑JSON 清单通过 Go 的embed特性直接编译进二进制对应实现位于 internal/config/provider_protocol_endpoints.go//go:embed provider_protocol_endpoints.json var protocolEndpointJSON []byte var documentedProtocolEndpoints func() map[string]map[string]ProviderProtocolEndpoint { var result map[string]map[string]ProviderProtocolEndpoint if err : json.Unmarshal(protocolEndpointJSON, result); err ! nil { panic(err) } return result }()加载失败会直接panic这保证了「清单即契约」——程序启动时端点数据一定可用。ProviderProtocolEndpoint结构体provider_protocol_endpoints.go的注释也再次强调了两条纪律这是已文档化的 SDK Base URL不是完整请求 URL这是目录元数据不会迁移用户已保存的连接。3.3 装配进 Provider Catalog端点数据通过ProtocolEndpointsForCatalog按品牌ID|区域|产品的 Scope 键查表并复制进每个 Provider 的 Catalogfunc ProtocolEndpointsForCatalog(c ProviderCatalog) map[string]ProviderProtocolEndpoint { source : documentedProtocolEndpoints[c.BrandID|c.Region|c.Product] result : make(map[string]ProviderProtocolEndpoint, len(source)) maps.Copy(result, source) return result }在 internal/config/provider_catalog.go 中CatalogForProviderPreset会把每个预置 Provider 的BrandID、Region、Product组合成 Scope 键查表并写入c.Protocols。例如预置deepseek-anthropic对应deepseek|global|api因此能拿到 openai、responses、anthropic 三条协议端点而ollama-local对应ollama|local|local拿到的是本机回环地址。Provider Catalog 只负责展示层级display hierarchy预置 ID、凭据与已保存的 Provider 条目才是安装层面的权威。3.4 测试如何保证端点数据不退化internal/config/provider_protocol_endpoints_test.go 对清单做了双层校验格式与必填校验遍历所有 Scope 与协议要求 kind 只能是openai、responses、anthropic三者之一且每个条目的BaseURL可被url.Parse解析、host 非空、Source与CheckedOn均非空预设与端点一致性校验对deepseek-anthropic、kimi-coding-plan、siliconflow、ppio、amd-gpu-cloud、lmstudio、mimo-api等预置断言具体协议的 BaseURL并验证 Catalog 返回的是拷贝而非共享可变 map。此外internal/boot/provider_endpoint_contract_test.go 中的TestRuntimeRejectsProtocolEndpointMismatch展示了端点的运行时强约束如果一个名为deepseek-anthropic的条目声明 kind 为openai却配置了 Anthropic 风格的 Base URL运行时装配 Provider 时会直接报错并提示正确的地址应为https://api.deepseek.com/v1/chat/completions。也就是说端点核对结果不仅用于展示还会参与 Provider 构建时的合法性校验见 ValidateProviderEndpoint 与 model_provider.go 的调用链。四、深入理解元数据字段与运行时行为4.1 authHeaderAnthropic 兼容网关的鉴权差异Anthropic 官方 API 使用x-api-key请求头但大量 Anthropic 兼容网关百度千帆、SiliconFlow、OpenRouter、PPIO、七牛、Qwen 等改用标准的Authorization: Bearer。JSON 清单中authHeader: true的条目如baidu|cn|api、openrouter|global|api、qwen|cn|api的 anthropic 路由正是这种差异的标记。在运行时该标记会从配置字段auth_headerconfig.go 注释for Anthropic-compatible gateways that expect Authorization: Bearer instead of x-api-key一路传递到 Provider 构造参数model_provider.go最终由 Anthropic 适配器决定发送Authorization: Bearer还是x-api-key头internal/provider/anthropic/anthropic.go。4.2 responsesModeResponses API 的无状态/有状态策略Responses API 存在两种上下文续接策略无状态stateless每次请求携带完整上下文与有状态stateful通过previous_response_id续接。JSON 清单中responsesMode: stateless出现在ollama|local|local、mimo|global|api、mimo|cn|token的 responses 路由上。对应配置字段responses_modeconfig.go的注释说明空值保留厂商自动探测DeepSeek 默认 stateless兼容端点可能使用 stateful显式设置则覆盖探测。该值经 model_provider.go 以mode键传入 Provider并在渲染配置时体现为responses_mode statelessrender.go。4.3 Scope 键的粒度同一品牌、不同产品各立门户Scope 由品牌ID|区域|产品三元组唯一确定因此同一品牌可以拥有多条端点记录例如kimi|cn|api与kimi|global|api与kimi|global|coding国内 API、国际 API、国际编程套餐各自独立qwen|cn|api、qwen|cn|coding、qwen|global|api、qwen|global|coding四条记录覆盖百炼国内/国际的普通 API 与 Coding 计划stepfun|global|api与stepfun|global|coding区分普通 API 与 Step Plan 套餐两者的 openai 地址不同/v1与/step_plan/v1。这种「分产品建账」的粒度让同一个品牌的不同资费/产品线可以拥有不同的端点与鉴权方式也避免了套餐端点与普通 API 端点相互污染。五、Notes 条款解读核对表的边界与原则文档末尾的 Notes 是理解这张表正确用法的关键逐条解读如下未确认的既有路由予以保留空缺不代表不支持表里「—」的格子只表示「官方文档层面未核对确认」不代表该提供商没有此协议能力。用户在 UI 中仍可手动配置。Qwen Responses 使用当前的 /compatible-mode/v1 路径文档记录的 workspace 专属域名可以替换共享主机但绝不能在产物中出现字面的{WorkspaceId}占位符——占位符必须被真实替换后才能使用。OpenCode 路由与模型强相关OpenCode 的go、zen两条产品线端点不同且「更换协议」并不等于「每个模型都支持该协议的路由」使用前需以具体模型为准。xAI 的 Anthropic 路由已被官方标记弃用仓库刻意不再将其作为新增推荐表中不为其记录 anthropic 端点。MiMo 国际 Token Plan 的 Responses 端点未确认不得从国内端点token-plan-cn反推国际端点表中国际 Token Plan 的 Responses 格为「—」。StepFun 旧版 Responses 路由归入普通 API 而非 Step Plan该地址被保留但未标记为已核实使用时应区分stepfun|global|api与stepfun|global|coding两条记录。可执行事实来源是 provider_protocol_endpoints.json每条路由都保存了source与checkedOn任何对端点的修改都应同步更新 JSON 清单并通过上一节的测试校验而不是只改文档。六、实操如何按这张表配置 Provider结合文档与源码配置一个 DeepSeek Anthropic 兼容 Provider 的完整步骤为选预置在 UI 中选择deepseek-anthropic预置对应 Scopedeepseek|global|api系统会自动装配https://api.deepseek.com/anthropic作为 Base URL并拼接/v1/messages请求后缀确认鉴权方式DeepSeek 的 anthropic 路由未标记authHeader走 Anthropic 原生x-api-key头如果选择的是百度千帆、SiliconFlow、OpenRouter 等标记了authHeader: true的网关则会自动切换为Authorization: Bearer核对日期意识端点核对日期集中在 2026-09-07 前后DeepSeek anthropic 为 2026-09-08若使用中发现地址变化应以 provider_protocol_endpoints.json 中最新checkedOn为准手动配置兜底表格空缺的协议地址无需担心直接在配置中手动填写提供商地址即可——文档明确声明「空缺表示未确认仍允许手动配置」已有连接不动升级后已保存的 Provider 连接不会被这张表迁移或覆盖符合「已有连接不迁移」的承诺。七、结论与延伸阅读预设协议地址核对表是 DeepSeek-Reasonix 多提供商接入体系的「地基数据」它以 JSON 清单为可执行事实来源经 Go embed 编译进二进制再通过ProtocolEndpointsForCatalog装配进 Provider Catalog最后由运行时校验与单元测试双重把关。理解这张表的 Scope 粒度、三种协议差异、authHeader与responsesMode元数据语义以及「文档核对 ≠ 连通测试」的边界是安全使用各提供商预设配置的前提。有兴趣的读者可继续阅读可执行清单internal/config/provider_protocol_endpoints.json结构体与加载逻辑internal/config/provider_protocol_endpoints.go清单校验测试internal/config/provider_protocol_endpoints_test.goProvider Catalog 装配internal/config/provider_catalog.go端点运行时契约测试internal/boot/provider_endpoint_contract_test.goProvider 装配调用链internal/boot/model_provider.go配置字段定义auth_header / responses_mode / chat_url / request_urlinternal/config/config.go【免费下载链接】DeepSeek-ReasonixDeepSeek-native AI coding agent for your terminal. Engineered around prefix-cache stability — leave it running.项目地址: https://gitcode.com/GitHub_Trending/de/DeepSeek-Reasonix创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考

读完文章,也想定制专属网站?

尧图设计师 24 小时内与您沟通定制方案

免费获取报价