[BUG] False auth conflict warning when using third-party ANTHROPIC_BASE_URL with both API key and /login managed key

Open 💬 0 comments Opened Jun 12, 2026 by lqing4654-hub

Environment

  • Platform: Windows 11
  • Claude Code: latest

Scenario

Two auth methods are set at the same time, targeting different servers:

  1. ANTHROPIC_AUTH_TOKEN — a DeepSeek API key, used with ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic. All model calls go to DeepSeek.
  2. /login managed key — an Anthropic OAuth token, used for claude.ai platform features (DesignSync, etc.)

Problem

Claude Code shows this warning on startup:

Both ANTHROPIC_AUTH_TOKEN and /login managed key set · auth may not work as expected

Why this is a false positive

  • ANTHROPIC_AUTH_TOKEN targets api.deepseek.com (third-party)
  • /login managed key targets api.anthropic.com (Anthropic platform)
  • The two keys go to different servers and do not actually conflict. Everything works fine in practice.

Suggested fix

When ANTHROPIC_BASE_URL is set to a non-Anthropic endpoint, ANTHROPIC_AUTH_TOKEN and the /login managed key should be allowed to coexist. They serve different purposes:

| Auth method | Target server | Purpose |
|---|---|---|
| ANTHROPIC_AUTH_TOKEN | Third-party (e.g. api.deepseek.com) | Model calls |
| /login managed key | api.anthropic.com | Platform features (DesignSync, etc.) |

Alternatively, provide a configuration option to explicitly set priority or suppress this warning.

Actual impact

Functionally everything works, but the warning appears on every startup, which degrades the user experience.

View original on GitHub ↗