[BUG] Support ANTHROPIC_BASE_URL
Status Fixed / completed
Maintainer reply ✓ Yes — bcherny
Activity 6 comments · opened Mar 19, 2025 · closed Mar 20, 2025
💡 Likely answer: A maintainer (bcherny, collaborator)
responded on this thread — see the highlighted reply below.
ANTHROPIC_BASE_URL/ANTHROPIC_API_KEY is not currently supported. Our organization requires routing LLM queries through a llm specific proxy for tracking and monitoring purposes. Can we support this config and skip the login in the cases where its set?
It seems like theres already a way to do this with Vertex and Bedrock, would be nice to do this natively for the claude api.
6 Comments
Yes it is supported
I don't think it overrides then?
(note works the same using
envcommand)and I get:
Try
HTTPS_PROXY?@bcherny this seems like a bug though? Why not support the
ANTHROPIC_API_KEY?HTTPS_PROXYwouldn't fix that. I get the urge to keep the issue system clean, but discarding legitimate issues doesn't seem like the way...All good looks like there's a similar issue here: https://github.com/anthropics/claude-code/issues/551
Will track that one.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.