sub2api icon indicating copy to clipboard operation
sub2api copied to clipboard

deepseek的openai协议怎么接入?

Open huangchuanfeng opened this issue 6 months ago • 2 comments

我在账号里添加了一个deepseek的api账号,类型为openai 的 api key,baseurl为https://api.openai.com,测试接口报错“账号已被探测为不支持 OpenAI Responses API(如 DeepSeek/Kimi 等三方兼容上游),账号本身可正常使用,但当前测试接口仅支持 Responses API 路径。请直接通过实际 API 调用验证。”

huangchuanfeng avatar May 20 '26 02:05 huangchuanfeng

我在账号里添加了一个deepseek的api账号,类型为openai 的 api key,baseurl为https://api.openai.com,测试接口报错“账号已被探测为不支持 OpenAI Responses API(如 DeepSeek/Kimi 等三方兼容上游),账号本身可正常使用,但当前测试接口仅支持 Responses API 路径。请直接通过实际 API 调用验证。” 然后我直接去codex中去使用,还是报错“unexpected status 502 Bad Gateway: Upstream request failed, url: http://192.168.2。。。”。 两种类型(Chat Completions 和 Responses)都试过了 求佬解答

huangchuanfeng avatar May 20 '26 02:05 huangchuanfeng

Image

如图配置即可,然后通过 cc switch 开启本地代理,代理给claude 使用就行,但是会报错:API Error: 400 The reasoning_content in the thinking mode must be passed back to the API. ,目前建议还是claude code 直连 ds官方

https://github.com/deepseek-ai/awesome-deepseek-agent/blob/main/docs/claude_code.zh-CN.md

DHclly avatar May 28 '26 03:05 DHclly