authentication
4 questions
- AI
How do I authenticate Claude Code in different environments?
Six methods in priority order: cloud provider env vars, ANTHROPIC_AUTH_TOKEN, ANTHROPIC_API_KEY, apiKeyHelper script, CLAUDE_CODE_OAUTH_TOKEN, and subscription OAuth. Each has different scopes and footguns.
- AI
How do I run Claude Code through my company's Amazon Bedrock account?
Set CLAUDE_CODE_USE_BEDROCK=1 and AWS_REGION, then authenticate with aws sso login or an API key. Model IDs use the us. cross-region prefix. Fast mode, ultraplan, and Remote Control are not available on Bedrock.
- AI
How do I point Claude Code at our Google Cloud Vertex AI endpoint?
Set three environment variables, authenticate with gcloud, and configure gcpAuthRefresh for sessions longer than an hour. MCP tool search is off by default on Vertex. Per-model region overrides use VERTEX_REGION_CLAUDE_* variables.
- AI
How do I route Claude Code through our LiteLLM proxy for cost tracking and audit?
Set ANTHROPIC_BASE_URL to your LiteLLM endpoint, choose between unified Anthropic format and pass-through provider endpoints, configure authentication with ANTHROPIC_AUTH_TOKEN or apiKeyHelper, and avoid the compromised LiteLLM PyPI versions 1.82.7 and 1.82.8.