GoForum🌐 V2EX

安装 Claude Code 后无法配置第三方 API

commoccoom · 2026-03-13 10:18 · 0 次点赞 · 3 条回复

使用 irm https://claude.ai/install.ps1 | iex 安装后,在 ~/.bashrc 配置 API

export ANTHROPIC_BASE_URL="https://api.poe.com"
export ANTHROPIC_AUTH_TOKEN="$POE_API_KEY"
export ANTHROPIC_API_KEY="" # Important: Must be explicitly empty

但是启动 Claude Code 后只能 3 个选项

 Claude Code can be used with your Claude subscription or billed based on API usage through your Console
  account.

 Select login method:

   1. Claude account with subscription · Pro, Max, Team, or Enterprise

   2. Anthropic Console account · API usage billing

 > 3. 3rd-party platform · Amazon Bedrock, Microsoft Foundry, or Vertex AI

选 1 ,2 需要登录 Anthropic

选 3 后

Using 3rd-party platforms

 Claude Code supports Amazon Bedrock, Microsoft Foundry, and Vertex AI. Set the required environment
 variables, then restart Claude Code.

 If you are part of an enterprise organization, contact your administrator for setup instructions.


 Documentation:
 · Amazon Bedrock: https://code.claude.com/docs/en/amazon-bedrock
 · Microsoft Foundry: https://code.claude.com/docs/en/microsoft-foundry
 · Vertex AI: https://code.claude.com/docs/en/google-vertex-ai


 Press Enter to go back to login options.

Claude Code v2.1.74

3 条回复
Leeeeex · 2026-03-13 10:18
#1

就选 1 正常登录,我记得用第三方的时候就正常登录,然后还是可以走配置的 API 地址。

commoccoom · 2026-03-13 10:18
#2

@Leeeeex 现在试了又好了,我人傻了。。。

leimu012 · 2026-03-13 10:28
#3

可以用下载个 CC Switch ,配置第三方 api 比较方便

添加回复
你还需要 登录 后发表回复

登录后可发帖和回复

登录 注册
主题信息
作者: commoccoom
发布: 2026-03-13
点赞: 0
回复: 0