Repository navigation
Bug: LLM router progressively degrades throughout session — reasoning, agentic, quick all fail until app restart #5503
Copy link
Copy link
Closed
Description
Summary
LLM access through the router degrades progressively throughout the day across all model tiers — reasoning, agentic, quick — until total model failure. The session starts functional but deteriorates to a state where no model is reachable and the app surfaces generic errors with no actionable information.
Problem
Degradation follows a consistent pattern within a single session:
Stage 1 — Individual model tiers go down:
another background task failed because the reasoning-v1 model is still temporarily unavailable.
looks like agentic-v1 is also down right now.
Stage 2 — Total model failure across all tiers:
- Switching to reasoning model:
The selected model isn't available on your provider. Check your model settings. - Switching to quick model:
The selected model isn't available on your provider. Check your model settings. - No model tier is reachable.
Stage 3 — App-level failure:
Something went wrong. Please try again. This error has been reported. You can also report it on Discord.
Secondary effects during the outage:
- Agent cannot write files to the workspace (background tool calls fail).
- Agent cannot complete tasks and surfaces repeated apologies instead of actionable status.
- No model-availability status surface in the UI — users must discover the failure by attempting a chat turn and hitting a generic error.
Root cause (suspected)
This is a router/provider-side availability issue, not a user misconfiguration:
- The degradation is progressive (not an instant all-or-nothing failure), suggesting provider rate limits, quota exhaustion, or a backend session/token that expires and is not refreshed.
- It affects multiple tiers simultaneously (reasoning-v1, agentic-v1, quick), pointing to a shared upstream dependency (the router itself, a provider credential, or a backend session) rather than a single model being down.
- The error
The selected model isn't available on your provideris the same error returned when a model is not configured — but here the models were working earlier in the session, so it is a runtime availability failure being surfaced as a misleading configuration error. - An app restart resets the session state and restores access, which is consistent with a credential/token expiry or leaked rate-limit state that is not automatically refreshed.
Reproduction
- Start a session and use the agent normally across multiple tasks.
- Observe: after extended use (hours), background tasks begin failing with
reasoning-v1 temporarily unavailable. - Additional tiers (agentic-v1) follow.
- Switching model tiers manually produces
The selected model isn't available on your provider. - App eventually surfaces generic
Something went wrongwith no further detail. - Restarting the app restores access.
Impact
- Users lose access to all LLM functionality mid-session with no warning and no recovery path short of a full app restart.
- In-progress tasks and agent plans are abandoned.
- Generic error messages (
check your model settings) mislead users into thinking they have a misconfiguration when the issue is a server-side availability failure.
Solution
- Identify what state expires or degrades over a long session (provider credential, router token, rate-limit bucket) and implement automatic refresh before failure occurs.
- Distinguish between "model not configured" and "model temporarily unavailable" in error messaging — these are different conditions and should surface differently to the user.
- Add a model-availability status indicator so users know when a tier is degraded without having to attempt a turn and hit a generic error.
- Implement automatic retry / tier fallback when a model is temporarily unavailable rather than surfacing the failure to the user on every turn.
- Log the specific upstream error that triggers
temporarily unavailableso the root cause is diagnosable from logs rather than guessed from user reports.
Acceptance criteria
- A session running for multiple hours does not progressively lose model access.
- If a model tier becomes temporarily unavailable, the app automatically retries or falls back to an available tier rather than failing the turn.
-
The selected model isn't available on your provideris not shown when the issue is a transient availability failure, not a misconfiguration. - A model-availability degradation is surfaced in the UI (status indicator or notification) before the user hits a failed turn.
- Logs capture the specific upstream error for each unavailability event.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
- StatusShow more project fieldsDone
Activity
test(web_chat): cover the tinyhumansai#5503 model-unavailable split's…
fix(web_chat): split transient model-unavailable from misconfig; prec…
YellowSnnowmann commentedon Aug 18, 2026
Status (verified against
main): the provable in-repo defects are fixed in #5528 (commit1dc4dca63):model_unavailable/ "check your model settings" config verdict. A newis_transient_unavailability_textsplit routes "temporarily unavailable" / "overloaded" bodies to the retryable "temporarily unavailable" provider path (retry + fallback preserved), while a genuine model rejection keeps the config copy.resolve_beareron the managed-inference path now prechecks the recorded JWTexpand fails fast asSESSION_EXPIREDbefore firing a doomed request that would surface as a misleading "model unavailable".Not yet implemented (leaving this open to track): a UI model-availability indicator (AC #4) and explicit automatic tier-fallback on transient unavailability (AC #2).
YellowSnnowmann commentedon Aug 19, 2026
Closing: the provable in-repo defect is fixed and merged in #5528 (transient-vs-misconfig classifier split + fail-fast on expired managed JWT), which resolves the progressive multi-hour degradation and the misleading "check your model settings" message on transient outages.
Two acceptance criteria are intentionally out of scope of this fix and remain deferred (not tracked in a separate issue yet):
fix(web_chat): split transient model-unavailable from misconfig; prec…
test(web_chat): cover the tinyhumansai#5503 model-unavailable split's…