Skip to content

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

Description

@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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:authbugSomething isn't workingplatform:windowsIssue specifically occurs on WindowsstaleIssue is inactive

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions