refactor(model-routing): centralize explicit foreground fallback policy#1
Closed
RaresKeY wants to merge 1 commit into
Closed
Conversation
|
The following required sections are missing or incomplete. Please update the PR description to address them:
This comment is deleted automatically once all sections are complete. |
3 tasks
RaresKeY
force-pushed
the
fix/strict-selected-model
branch
from
July 21, 2026 22:10
9c7a210 to
b4f27a7
Compare
RaresKeY
force-pushed
the
refactor/explicit-foreground-fallback-policy
branch
from
July 21, 2026 22:10
0f0ff74 to
12773e2
Compare
Make foreground fallback an explicit per-user, availability-only policy shared by streaming Chat, non-stream Chat, and Agent runs. Preserve strict defaults, owner/model and credential boundaries, pinned Agent routes, and truthful per-round provenance/accounting. Carry provider-reported model identifiers through native streaming adapters, non-stream responses, and caches, and keep legacy default_model_fallbacks as tombstoned raw storage that generic settings APIs and agent tools cannot expose or mutate.
RaresKeY
force-pushed
the
refactor/explicit-foreground-fallback-policy
branch
from
July 21, 2026 23:04
12773e2 to
1d0e7cd
Compare
Owner
Author
|
Superseded by the canonical upstream draft PR odysseus-dev/odysseus#5683, which targets |
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.
Summary
Foreground Chat, non-stream
POST /api/chat, and every Agent round are strict unless the current user explicitly enables a new ordered fallback policy. When enabled, only documented availability failures may advance to an exact owner-visible endpoint/model candidate; request, authentication, authorization, unsupported-model, and configuration failures surface directly.After a fallback produces substantive output or completes a tool call, Agent mode pins that route for the rest of the run. SSE events, per-round labels, saved history, terminal failures, token usage, and final metrics identify the route that actually answered. Failed candidate streams are closed before another route starts and on consumer cancellation.
The historical
default_model_fallbacksvalue remains stored but has no runtime or UI connection and is never migrated into this policy. The retired silent endpoint-switch helper is removed.Scope
In scope:
foreground_fallback_enabledandforeground_model_fallbackspolicy;Out of scope:
default_model_fallbacks.Stack / target branch
fix/strict-selected-model(fix(model-routing): keep user-selected models strict odysseus-dev/odysseus#5632), its immediate predecessor.devafter fix(model-routing): keep user-selected models strict odysseus-dev/odysseus#5632 lands.Linked issue
Fixes odysseus-dev/odysseus#5626
Part of odysseus-dev/odysseus#5625
Type of change
Acceptance criteria covered
Validation
Focused exact-head run:
Result: 314 passed.
Additional exact-head checks:
python -m py_compile;node --check;0f0ff74f4f34121351998b066b4451124b3425e1.Full isolated suite:
How to test manually
POST /api/chatwith the same strict, eligible, and ineligible cases.default_model_fallbacksremains stored.Validation gaps
No live-provider smoke or browser/screenshot validation was performed. The PR remains draft while those integration checks are pending.