fix(auxiliary): honor /anthropic-suffixed gateway base_url on aux + fallback calls - #62061
fix(auxiliary): honor /anthropic-suffixed gateway base_url on aux + fallback calls#62061iso2kx wants to merge 1 commit into
Conversation
iso2kx
commented
Jul 10, 2026
beea758 to
dbe2daf
Compare
Related: auxiliary-client custom-provider base_url routing family — #36757 (post-override base_url for endpoint detection), #24586/#34299 (ProviderProfile.api_mode consult), #17027 (merged, Anthropic Messages transport auto-detect). Same |
|
Thanks for the focused regression fix. Current The added config-backed regression test exercises the affected Automated hermes-sweeper review. |
…allback calls `_try_anthropic()` applies the configured `model.base_url` only when `_is_anthropic_compatible_host()` trusts it, but that check accepted only the literal `api.anthropic.com` host. Anthropic-compatible gateways that expose the native Messages protocol under a `/anthropic` path suffix (MiniMax, Zhipu GLM, LiteLLM-style relays, self-hosted proxies) were rejected, so every auxiliary call (title generation, memory extraction, vision, reflection) and the `provider: anthropic` fallback chain discarded the configured base_url and fell back to `https://api.anthropic.com`. That diverges from the primary path, which already trusts the `/anthropic` suffix via `runtime_provider._detect_api_mode_for_url`, and fails outright when the gateway (not Anthropic) holds the credentials. Accept `/anthropic` and `/anthropic/v1` suffixed URLs in `_is_anthropic_compatible_host()`, matching the primary-path convention and `_wrap_if_needed`. A bare non-Anthropic base_url (e.g. `openrouter.ai/api/v1` left on `provider: anthropic`) still returns False, preserving the NousResearch#52608 guard.
dbe2daf to
48c8f28
Compare
|
Rebased onto current Bumping this because the gap bit me again in production this morning, which I think makes the P3 a little optimistic. Setup: What happened:
The relevant log line, verbatim: Confirmed the traffic genuinely never reached the gateway (its own request counter didn't move for those calls), so this isn't a mislabelled log line. A second tell from the same window: during a concurrent DNS outage the primary leg returned Worth noting the blast radius is wider than the fallback chain: because Two smaller notes for whoever picks this up:
Happy to add a |