[BUG] Can't log out of Claude Code API Key usage or use Vertex AI

Resolved 💬 4 comments Opened May 28, 2025 by andrew-kurin Closed May 28, 2025

Environment

  • Platform (select one):
  • [ ] Anthropic API
  • [ ] AWS Bedrock
  • [x] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.3 (Claude Code)
  • Operating System: macOS 14.6.1 (23G93
  • Terminal: Warp

Bug Description

Vertex AI settings not available, can't log out from using API key

Steps to Reproduce

I have env vars for Vertex AI set in my .zshrc, but they are ignored by Claude Code now.
export CLAUDE_CODE_USE_VERTEX=1
export CLOUD_ML_REGION=us-east5
export ANTHROPIC_VERTEX_PROJECT_ID=<project_id>
/status shows that I'm logged in using API key

 Account • /login
  L Login Method: API Key (/login managed key)

/login and /logout steps are not available

Expected Behavior

Claude Code should be using Vertex AI instead of API key
I should be able to /logout to stop using API key

Actual Behavior

I'm locked into using api key, Vertex AI settings are ignored

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗