“ANTHROPIC_API_KEY or another auth source is set” — Claude Code
Quick fix
将 CC Switch 从 3.16.4 升级到经过相关功能重构的 4.0 或更新版本后重新测试。
Symptom
Section titled “Symptom”⚠ claude.ai connectors are disabled because ANTHROPIC_API_KEY or another auth source is set and takes precedence over your claude.ai login · Unset it to load your organization's connectorsClaude Code 检测到 `ANTHROPIC_API_KEY` 或其他认证来源后,会优先使用它,而不是 `claude.ai` 登录,因此禁用 `claude.ai connectors`。该报告出现在通过 CC Switch 从官方配置切换到腾讯云 Coding Plan 的 GLM-5 后。
报告者还遇到持续重试、无法使用的问题,但 issue 没有提供相关日志,也没有确认警告与重试故障是否具有同一根因。该 issue 最终因长期无新复现信息而超时关闭;维护者仅说明 4.0 已对相关功能进行较大重构,未确认问题已被修复。
将 CC Switch 3.16.4 更新到 4.0 或更新版本,然后重新切换到腾讯云 Coding Plan 的 GLM-5 并测试 Claude Code CLI。
如果问题仍然存在,补充当前 CC Switch 版本、macOS 信息、完整复现步骤以及相关日志或截图,并重新报告问题。
如果实际目标是恢复组织的 `claude.ai connectors`,按提示取消设置 `ANTHROPIC_API_KEY` 或其他优先认证来源;该操作会改变当前认证方式,不是腾讯云配置不可用的已确认修复。
Affected Versions
Section titled “Affected Versions”ToolClaude Code
Version受影响版本:CC Switch 3.16.4
PlatformsmacOS
Source Issues
Section titled “Source Issues”本页汇总自 1 个真实 issue
(暂无 FAQ)
这是一个非官方社区 wiki,与 cc-switch 作者及项目本身无隶属关系。内容整理自项目公开的 GitHub issues。本站不分发任何软件。