refactor: remove legacy fallback chains and dual-protocol shims - #103
Merged
Conversation
- Drop OpenRouter/direct fallback stages from routing policy and the DirectFallbacks catalog field - Delete client fallback.go/weighted.go provider chains - Simplify MiMo and DeepSeek clients to OpenAI-compatible endpoints; remove Anthropic fallback legs, MiniMax dual-protocol client, and ResolveXiaomiAnthropicBase - Remove legacy xiaomi keychain account alias migration and XIAOMI_MIMO_API_KEY credential aliases - Fix DeepSeek canonical base URL and add StepFun cn region option
…l round-trips Replace StripReasoningFromInput with RequiresReasoningPassback. DeepSeek returns HTTP 400 when a prior assistant turn performed a tool call without its reasoning_content being passed back, so forward it for DeepSeek while keeping all other providers from transmitting reasoning_content.
type:enabled + budget_tokens is deprecated on Claude 4.6 and rejected on 4.7+, so explicit ThinkingMode enabled now maps to adaptive. OpenRouter reasoning no longer sends effort:none to disable since mandatory-reasoning models reject it.
Pulls in the Gateway/Model contract extensions (region options, thinking defaults, DNS host) that the engine catalog and control plane rely on.
The TTL cleanup test used fixed wall-clock sleeps and failed under the race detector / loaded CI runners (Expected 0 inflight after TTL, got 1). Poll for the expected stats state with a deadline instead.
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.
Removes all legacy provider fallback machinery:
DirectFallbackscatalog fieldclient/fallback.go/client/weighted.goprovider chainsResolveXiaomiAnthropicBaseXIAOMI_MIMO_API_KEYcredential aliaseshttps://api.deepseek.com, no /v1) and add StepFun cn region optionAlso includes the gateway alphabetical-sort feature work from the branch tip.