Skip to content

[BUG] [FIX] VS Code Extension does not recognize ANTHROPIC_BASE_URL and shows login screen #20271

Description

@shaunyogeshwaran

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Fixed issue #8522 by configuring "claudeCode.disableLoginPrompt": true and adding LiteLLM proxy environment variables (LITELLM_PROXY_API_KEY and LITELLM_PROXY_URL) in VS Code settings. This solution bypasses the login screen and routes requests through LiteLLM to custom backends, providing a working alternative to the unsupported ANTHROPIC_BASE_URL feature.

I'd assume this works with other 3rd party providers too

What Should Happen?

Claude Code should respect environment variables for custom backends and bypass the Anthropic login screen when configured with alternative LLM providers.

Error Messages/Logs

Steps to Reproduce

  1. Install Claude Code 2.0.0+
  2. Set ANTHROPIC_BASE_URL in environment or configuration file
  3. Open VS Code and try to use Claude Code
  4. Observe that Claude Code ignores the custom URL and displays Anthropic login screen
  5. Unable to proceed with custom LLM backend configuration

Claude Model

Not sure / Multiple models

Is this a regression?

No, this never worked

Last Working Version

No response

Claude Code Version

2.1.17

Platform

Other

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions