opencode的deepseek-v4-flash-free模型通过newapi和cc switch接入claude code使用

1、登录opencode获取api密钥 auth.opencode.ai OpenAuth 2、neiapi管理后台添加渠道,填入第一步获取的api密钥,api地址填 https://opencode.ai/zen ,模型填deepseek-v4-flash-free 3、展开高级设置,可视化编辑,...
opencode的deepseek-v4-flash-free模型通过newapi和cc switch接入claude code使用
opencode的deepseek-v4-flash-free模型通过newapi和cc switch接入claude code使用

1、登录opencode获取api密钥

auth.opencode.ai

OpenAuth

image

2、neiapi管理后台添加渠道,填入第一步获取的api密钥,api地址填https://opencode.ai/zen,模型填deepseek-v4-flash-free

image

3、展开高级设置,可视化编辑,设置字段填入messages.*.reasoning_content ,开启保留原值

一定要弄这步不然在claude code中调用工具会出现400错误, API Error: 400 Error from provider (DeepSeek): The reasoning_content in the thinking mode must be passed back to the API.

image
image

这个解决方法是在这位佬友帖子找到的,感谢佬友

MiMO 报错 `The reasoning_content in the thinking mode must be passed back to the API.` 开发调优
[image] 我是这样配置的

4、newapi令牌管理,创建令牌,获取密钥

5、cc switch添加新供应商,api密钥填上一步newapi获取的,请求地址填newapi的地址,api格式用anthropic或者openai的都可以,如果用openai的话cc switch要开启路由,模型全部填deepseek-v4-flash-free

image
image

1 个帖子 - 1 位参与者

阅读完整话题

来源: LinuxDo 最新话题查看原文