Create

Sign in to ReadmeX

or

How we handle your data: Privacy Policy

ReadmeX

Your AI reading companion

What would you like to catch up on?

Pick a briefing, or ask your own question.

Your community and people briefings stay personal to you.

Story

Suppress Claude Code’s unrecognized_model Warning When Using DeepSeek

AI summary

A Juejin AI report reproduced an unrecognized_model diagnostic when Claude Code 2.1.308 connected to DeepSeek through ANTHROPIC_BASE_URL in non-interactive mode. A four-configuration test found that modelOverrides mappings in ~/.claude/settings.json removed the harmless stderr message, while modelSettings and the [1m] suffix did not; the report notes that requests still succeeded.

In-depth insight

The tested modelOverrides configuration provides a specific way to keep Claude Code from logging the harmless warning when a third-party model ID is not in its recognized model registry.

30 秒解决

在 ~/.claude/settings.json 里加一段:

{
  "modelOverrides": {
    "claude-opus-5-5": "deepseek-v4-pro",
    "claude-sonnet-5-5": "deepseek-flash",
    "claude-haiku-5-5": "deepseek-flash"
  }
}

重新跑一次 claude -p "回复ok",那行告警就没了。

下面解释为什么,以及我踩过的坑。

现象:一行看起来像报错的"告警"

用 Claude Code 通过 ANTHROPIC_BASE_URL 接 DeepSeek 跑非交互模式时,stderr 会多出一行:

#Claude Code#DeepSeek#Anthropic

Original · 3 min readRead the original
Group chat

No comments yet. Start the conversation.