fix: remove ANTHROPIC_BASE_URL env var to avoid collisions#1675
Merged
fix: remove ANTHROPIC_BASE_URL env var to avoid collisions#1675
Conversation
ANTHROPIC_BASE_URL collides with Claude Code and other Anthropic tooling. Remove it from the Anthropic provider — base URL overrides should go through config.yaml model.base_url instead. The Alibaba/DashScope provider has its own dedicated base URL and API key env vars which don't collide with anything.
rivercrab26
pushed a commit
to rivercrab26/hermes-agent
that referenced
this pull request
Mar 18, 2026
The Anthropic provider base URL was hardcoded to https://api.anthropic.com in both runtime_provider.py and auxiliary_client.py after ANTHROPIC_BASE_URL env var was removed in NousResearch#1675. This makes it impossible to use Anthropic-compatible proxies (e.g. Sub2API, LiteLLM proxy) without modifying source code. Other providers (alibaba, custom, etc.) already read base_url from config or env vars. Fix: read model.base_url from config.yaml as an override, falling back to the default https://api.anthropic.com when not set. This is consistent with how other providers handle base URL configuration. Closes #XXXX
rivercrab26
pushed a commit
to rivercrab26/hermes-agent
that referenced
this pull request
Mar 18, 2026
The Anthropic provider base URL was hardcoded to https://api.anthropic.com in both runtime_provider.py and auxiliary_client.py after ANTHROPIC_BASE_URL env var was removed in NousResearch#1675. This makes it impossible to use Anthropic-compatible proxies (e.g. Sub2API, LiteLLM proxy) without modifying source code. Other providers (alibaba, custom, etc.) already read base_url from config or env vars. Fix: read model.base_url from config.yaml as an override, falling back to the default https://api.anthropic.com when not set. This is consistent with how other providers handle base URL configuration. Closes NousResearch#1948
teknium1
pushed a commit
that referenced
this pull request
Mar 18, 2026
After #1675 removed ANTHROPIC_BASE_URL env var support, the Anthropic provider base URL was hardcoded to https://api.anthropic.com. Now reads model.base_url from config.yaml as an override, falling back to the default when not set. Also applies to the auxiliary client. Cherry-picked from PR #1949 by @rivercrab26.
teknium1
added a commit
that referenced
this pull request
Mar 18, 2026
#1998) After #1675 removed ANTHROPIC_BASE_URL env var support, the Anthropic provider base URL was hardcoded to https://api.anthropic.com. Now reads model.base_url from config.yaml as an override, falling back to the default when not set. Also applies to the auxiliary client. Cherry-picked from PR #1949 by @rivercrab26. Co-authored-by: rivercrab26 <rivercrab26@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes the
ANTHROPIC_BASE_URLenv var added in #1673. It collides with Claude Code and other Anthropic tooling that use the same variable.Base URL overrides for Anthropic-compatible endpoints should go through
config.yaml(model.base_url) instead of environment variables.The Alibaba/DashScope provider is unaffected — it has its own dedicated
DASHSCOPE_API_KEYand hardcoded base URL that don't collide with anything.