Skip to content

fix: remove ANTHROPIC_BASE_URL env var to avoid collisions#1675

Merged
teknium1 merged 1 commit intomainfrom
hermes/hermes-ac005632
Mar 17, 2026
Merged

fix: remove ANTHROPIC_BASE_URL env var to avoid collisions#1675
teknium1 merged 1 commit intomainfrom
hermes/hermes-ac005632

Conversation

@teknium1
Copy link
Copy Markdown
Contributor

Removes the ANTHROPIC_BASE_URL env 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_KEY and hardcoded base URL that don't collide with anything.

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.
@teknium1 teknium1 merged commit 71c6b1e into main Mar 17, 2026
1 check failed
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant