[BUG] VS Code extension should support local API without login prompt

Status Open
Reported on v2.1.224
Maintainer reply None cached
Activity 0 comments · opened Aug 7, 2026

What's Wrong?

When using Claude Code with a local LLM gateway via ANTHROPIC_BASE_URL and ANTHROPIC_API_KEY environment variables, the VS Code extension still requires login and ignores the disableLoginPrompt setting.

Expected behavior:

  • If ANTHROPIC_BASE_URL and ANTHROPIC_API_KEY are set, the extension should use the local API without prompting for login
  • The disableLoginPrompt setting should be respected

Current behavior:

  • The login screen always appears, regardless of environment variables or settings
  • No way to use a local API endpoint in the VS Code extension

Workaround:

  • Using Claude Code from the terminal CLI works correctly with local APIs

Claude Code Version

2.1.224 (Claude Code)

Platform

Anthropic API Local

Operating System

Windows

Terminal/Shell

VS Code extension Claude

Correct One

But this code worked correctly

from anthropic import Anthropic

client = Anthropic(
    base_url="http://localhost:8045",
    api_key="sk-9f2e611....291036cce5455c7d0"
)

response = client.messages.create(
    model="gemini-3-flash",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello"}]
)
print(response.content)

View original on GitHub ↗