fix(llm): route http_client to the matching sync/async Anthropic client#562
Closed
matteomedioli wants to merge 4 commits into
Closed
fix(llm): route http_client to the matching sync/async Anthropic client#562matteomedioli wants to merge 4 commits into
matteomedioli wants to merge 4 commits into
Conversation
…ync Anthropic clients Route httpx.Client only to the sync anthropic.Anthropic constructor and httpx.AsyncClient only to the async anthropic.AsyncAnthropic constructor, mirroring BaseOpenAILLM's existing param-splitting pattern, so passing a sync-only or async-only http_client no longer collides across both clients.
… type Mirror BaseOpenAILLM's existing behavior: when http_client is provided but is neither an httpx.Client nor an httpx.AsyncClient instance, emit a warning and construct both clients with the default (no custom) http_client instead of raising.
…tests Add unit tests verifying httpx.Client reaches only the sync Anthropic client, httpx.AsyncClient reaches only the async client, and an invalid http_client type warns and falls back to defaults for both clients. Also note the stale-venv anthropic version gotcha in AGENTS.md.
Documents the AnthropicLLM sync/async http_client kwargs collision bug fixed in tasks 001-002, matching the repo's existing changelog style.
matteomedioli
marked this pull request as draft
July 16, 2026 21:49
matteomedioli
force-pushed
the
matteo/anthropic-kwargs-bugfix-GENKGB-1658
branch
from
July 16, 2026 21:49
f0c905b to
0751af6
Compare
This was referenced Jul 16, 2026
13 tasks
Contributor
Author
|
Accidentally closed by a branch rename (no content lost, no review activity on this PR). Reopened as #565. |
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.
No description provided.