Repository navigation
fix(backend): degrade file chat on missing gateway lane - #12449
Merged
Merged
Conversation
Failure-Class: FC-ship-before-required-route
5 tasks done
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.
What changed and why
File chat now treats an OpenAI-compatible
404with the typedmodel_not_foundcode as a gateway capability-skew signal and retries the completion through the existing direct-provider kill-switch path. It records the recovery through shared fallback telemetry, while genuine provider file404s remain typed stale-attachment failures.Production evidence on 2026-08-30 showed the backend calling the new
omi:auto:file-chat-*lanes added by #12337 while the serving gateway image still predated those lanes. Every observablellm_gateway_request_rejected ... error_class=model_not_foundevent matched a backendStaleChatFileErrorchat failure; the status-only attachment classifier had hidden the actual gateway rejection.Product invariants affected
none
How it was verified
model_not_foundrejections on the current backend revision matched 21 file-chatStaleChatFileErrorfailures one-for-one by timestamp. The earlier backend revision contributed four more file-chat failures; its gateway pod logs had already rolled over.cd backend && PYTHONPATH=. .venv/bin/python -m pytest -q tests/unit/test_chat_file_gateway_surface.py tests/unit/test_chat_file_completions.py— 16 passed.cd backend && ./scripts/typecheck.sh— 0 errors.git diff --check— passed.make preflight— passed after commit againstorigin/main.The fix was not deployed from this branch. Live log correlation proves the incident path; the regression suite exercises the recovery seam without sending user data or provider traffic.
Tests
backend/tests/unit/test_chat_file_gateway_surface.pynow proves:model_not_foundrejection;404does not fall back and remainsStaleChatFileError;exhausted, neverrecovered;Failure class (fixes)
Failure-Class: FC-ship-before-required-route