No endpoints available that support Anthropic - Claude Code
Quick fix
升级 Claude Code 至 v2.1.92 及以上版本,并更新 cc-switch 以修复 OpenRouter 参数传递错误,或尝试关闭本地代理。
Symptom
Section titled “Symptom”API Error: 400 {"error":{"message":"No endpoints available that support Anthropic's context management features (context-management-2025-06-27). Context management requires a supported provider (Anthropic).","code":400}}在使用 cc-switch 3.12.3 配合 OpenRouter(如 qwen/qwen3.6-plus:free)运行 Claude Code 时,由于 cc-switch 向 OpenRouter 多传递了不支持的参数,导致触发 400 错误。此外,旧版 Claude Code(如 v2.1.81)与特定 OpenRouter 模型存在兼容性问题,部分情况下的报错也可能受本地代理设置干扰。
将 Claude Code 升级到 v2.1.92 或更高版本,该版本已修复与部分 OpenRouter 模型的兼容性问题。
更新 cc-switch 至最新版本,官方已修复向 OpenRouter 多传参数的 bug(参考 issue #1898)。
在 cc-switch 设置中尝试关闭「本地代理」功能,以排除代理环境导致的请求异常。
若问题仍未解决,可暂时切换到其他模型供应商进行测试。
Affected Versions
Section titled “Affected Versions”ToolClaude Code
Version< v2.1.92 (配合 cc-switch 3.12.3)
PlatformsWindowsmacOS
Source Issues
Section titled “Source Issues”本页汇总自 2 个真实 issue
- 为什么在终端中可以使用 Claude Code,但在 VSCode 插件里就报这个错误?
- 这可能是因为 VSCode 插件继承了不同的环境变量或受到了 cc-switch 本地代理的影响。请尝试在 cc-switch 中关闭「本地代理」,并确保插件使用的 Claude Code 版本已升级至 v2.1.92 以上。
- 这个报错和使用的具体模型有关吗?
- 是的,有用户反馈在使用 OpenRouter 的 qwen/qwen3.6-plus:free 模型时遇到此问题,切换到其他供应商后恢复正常。升级 Claude Code 和 cc-switch 通常能解决此兼容性问题。
thinking enabled but reasoning_content关闭 Claude Code 的 Thinking 模式,或升级 cc-switch 解决 Kimi/Moonshot 工具调用报错。ccstatusline 显示的模型名不正确 - Claude Code在 ccstatusline 中配置 Custom Command 脚本,读取 cc-switch 数据库中的环境变量以正确显示实际模型。Bash(...) Waiting... Claude Code降级 Claude Code 至 v2.1.104 或 v2.0.64(需管理员权限),或切换至阿里云百炼等兼容 provider,因 Nvidia 模型无法正确解析 tool use 格式。
这是一个非官方社区 wiki,与 cc-switch 作者及项目本身无隶属关系。内容整理自项目公开的 GitHub issues。本站不分发任何软件。