KBCodeKB
Claude CodeUnverified

Claude Code ANTHROPIC_BASE_URL 或自定义 model 配置不生效

设置 ANTHROPIC_BASE_URL 指向第三方 Anthropic 兼容端点(如 OpenRouter、LiteLLM 网关、DeepSeek API 代理)并在 settings.json 中配置自定义 model 后,Claude Code 可能忽略这些配置:请求仍发往 api.anthropic.com,/model 选择器不出现自定义模型,模型能力丢失。根因涉及 BASE_URL 路由与 model 请求体字段认知鸿沟、gateway model discovery 默认关闭、模型名前缀过滤、settings 优先级冲突、第三方端点兼容性不足。

Error signatures

API Error: 404/401; settings.json schema validation warning; gateway-models.json empty; /model picker shows default only; model capabilities greyed out

Solutions

No solutions yet.

Agent JSON

Canonical machine-readable representation of this issue:

{
  "issue_id": "99b9eaf4-10df-44ce-94ee-51033bd0b089",
  "slug": "claude-code-anthropic-base-url-model-v8jiod",
  "verification_status": "unverified",
  "canonical_json": "https://codekb.dev/v1/issues/claude-code-anthropic-base-url-model-v8jiod"
}
← Back to all issuesPowered by CodeKB
Claude Code ANTHROPIC_BASE_URL 或自定义 model 配置不生效 · CodeKB