fix(auxiliary_client): consult ProviderProfile.api_mode in resolver - #34299
Open
Kyzcreig wants to merge 1 commit into
Open
fix(auxiliary_client): consult ProviderProfile.api_mode in resolver#34299Kyzcreig wants to merge 1 commit into
Kyzcreig wants to merge 1 commit into
Conversation
Manual re-apply of c1d5f9e onto v0.15.1 (_resolve_task_provider_model moved to ~4432). When an explicit provider is given with no task-config api_mode override, fall back to the provider profile's declared api_mode so plugin providers whose upstream speaks the Anthropic Messages API are wrapped with the correct transport regardless of base-URL shape. Task config still wins; wrapped in try/except. Adds a fresh regression test (original commit was code-only) pinning profile fallback, task-config-wins, and None passthrough. Original-commit: c1d5f9e
Collaborator
|
Duplicate of #24586 — same fix (consult ProviderProfile.api_mode in resolver), same author, same file. Resubmission of earlier PR. |
Contributor
|
Thanks for the focused resolver fix. The premise remains valid on current main: Problems
Suggested changes
This is an automated hermes-sweeper review. |
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.
Plugin providers that declare
api_mode='anthropic_messages'with a plain base_url (no /anthropic suffix) silently land on the OpenAI-wire transport and 404 from chat/completions, because_resolve_task_provider_modelonly returns the task-config api_mode and never consults the provider profile._endpoint_speaks_anthropic_messagesonly catches /anthropic-suffixed URLs, missing plain-base-URL Anthropic endpoints (e.g. local proxies on 127.0.0.1:PORT). This falls back toprofile.api_modewhen no task override is set (task config still wins), wrapped in try/except. Includes a 3-case regression test (test_aux_resolver_api_mode.py).