Skip to content

[BUG] ANTHROPIC_BASE_URL ignored during setup #15274

Description

@wisepotato

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?

From version 2.0.55 till 2.0.74, when you have a custom ANTHROPIC_BASE_URL, the initialisation of ~/.claude.json fails. It tries to connect to api.anthropic.com, which is blocked for our organisation. Moreover, I am able to get around this by installing 2.0.54 first, and then installing the latest (2.0.74) at this time.

I'm trying to provision claude code for 500+ people, so custom workarounds is something I'd like to prevent. After going past the "init" phase of getting ~/.claude.json created, I am able to upgrade, so my theory is that there is a bug in that part of the code. After upgrading ANTHROPIC_BASE_URL is respected again.

Image

What Should Happen?

ANTHROPIC_BASE_URL should be respected on first run

Error Messages/Logs

Steps to Reproduce

Install latest version of claude code, with settings preconfigured in ~/.claude/settings.json to point to a different endpoint, that endpoint will not be respected. ~/.claude.json should not be present. It will not be created.

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.0.54

Claude Code Version

2.0.74

Platform

Other

Operating System

Other Linux

Terminal/Shell

Windows Terminal

Additional Information

This doesnt work on linux (alma), or windows (win 11)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:apiarea:authbugSomething isn't workinghas reproHas detailed reproduction stepsplatform:linuxIssue specifically occurs on Linuxplatform:windowsIssue specifically occurs on Windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions