Claude Code 使用 deepseek-v4-pro 报错

5 月 29 日
 SeanSherwood

今天使用 deepseek-v4-pro 的 Claude Code 突然报错,提示 ''' API Error: 400 Failed to deserialize the JSON body into the target type: messages[1].role: unknown variant system, expected user or assistant at line 1 column ''' 是因为 deepseek 不支持 system role 了吗?

3014 次点击
所在节点    Claude Code
10 条回复
longaiwp
5 月 29 日
回退版本到 153 就行了,新版有兼容性问题
YJi
5 月 29 日
刚降完 又给我自动升级了..
TimPeake
5 月 29 日
应该格式兼容。估计 deepseek 那边会处理。GLM 没问题
SeanSherwood
5 月 29 日
多谢,刚开始用,没想到自动更新了
SeanSherwood
5 月 29 日
@TimPeake 是版本问题,deepseek 无法使用,回退版本解决了
SeanSherwood
5 月 29 日
@YJi 在终端里配置这个试试

# 关闭 cc 自动升级
export DISABLE_AUTOUPDATER=1
YJi
5 月 29 日
@SeanSherwood #6 感谢
Mjhhh
5 月 29 日

L 站也有人讨论过,目前解决方案
cecil2016
5 月 29 日
utodea
5 月 29 日

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/1216479

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX