fix(anthropic): re-apply ANTHROPIC_BASE_URL override reverted by 2.4.3 snapshot#301
Open
psvaggelis wants to merge 1 commit into
Open
fix(anthropic): re-apply ANTHROPIC_BASE_URL override reverted by 2.4.3 snapshot#301psvaggelis wants to merge 1 commit into
psvaggelis wants to merge 1 commit into
Conversation
keshprad
approved these changes
Jul 23, 2026
keshprad
left a comment
Member
There was a problem hiding this comment.
apologize for accidental revert
keshprad
requested changes
Jul 23, 2026
keshprad
left a comment
Member
There was a problem hiding this comment.
Can you sign your commit to ensure the DCO check passes?
Re-applies NVIDIA#282, reverted on main by the 2.4.3 OSS snapshot sync (a54947c). resolve_credentials() now reads ANTHROPIC_BASE_URL and create_chat_model() uses base_url or the default endpoint, so proxy/gateway deployments route through the configured host again. Regression coverage for the override and default paths restored. Signed-off-by: Papastavros Vaggelis <psvaggelis@gmail.com>
psvaggelis
force-pushed
the
fix/reapply-anthropic-base-url
branch
from
July 23, 2026 18:49
c20afa4 to
c33597b
Compare
Contributor
Author
|
Signed off the commit — DCO should pass once the workflow run is approved, thanks! |
keshprad
approved these changes
Jul 23, 2026
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.
What
Restores the
ANTHROPIC_BASE_URLhandling from #282. On currentmain,AnthropicProvideragain ignoresANTHROPIC_BASE_URLand sends every requestto api.anthropic.com regardless of the configured endpoint.
Why
#282 was merged into
mainon 2026-07-22, then reverted by the"Sync OSS release snapshot 2.4.3" commit
a54947c(#299, 2026-07-23), whichoverwrote the same four files back to their pre-fix state. As of
maintoday:resolve_credentials()returns(api_key, None)— the env var is never read.create_chat_model()hardcodesbase_url=ANTHROPIC_BASE_URL(the module default).This bypasses proxy / gateway / egress-controlled deployments and re-introduces
the inconsistency with
OpenAIProvider, which honorsOPENAI_BASE_URL.Changes
providers/anthropic/provider.py:resolve_credentials()readsANTHROPIC_BASE_URL;create_chat_model()usesbase_url or ANTHROPIC_BASE_URL.Unset behaves exactly as before (requests go to the public API).
ANTHROPIC_BASE_URLcleared in the env-isolation fixtures).Testing
ruff check/ruff format --check: clean.pytest -m "not integration and not provider": 1381 passed, 12 skipped, 6 xfailed.