(fix) deep context intelligent assistant model vision verification no cache - #4147
Conversation
|
Important This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior. Changed Packages
|
PR Summary by QodoAvoid caching model-vision verification failures for upstream 5xx responses
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTo customize comments, go to the Qodo configuration screen, or learn more in the docs. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4147 +/- ##
==========================================
- Coverage 58.12% 58.03% -0.09%
==========================================
Files 2422 2411 -11
Lines 96490 96287 -203
Branches 26854 26780 -74
==========================================
- Hits 56081 55877 -204
- Misses 40203 40214 +11
+ Partials 206 196 -10
*This pull request uses carry forward flags. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
… not cached for 500 error Signed-off-by: Lucas <lyoon@redhat.com>
|



Summary
Fixes deep context model vision verification to not cache
falseresults when the upstream returns a 5xx error.Why
Previously, when the vision verification endpoint received a 5xx from the upstream model server (e.g., temporary outage, overloaded), the result was cached as
supportsVision: false. This meant the model was permanently marked as non-vision-capable until cache expiry, even though the failure was transient. Users would lose deep context (image attachment) functionality for that model until the cache cleared.What changed
else if (status >= 500)andelsebranches from the vision verification handler inrouter.ts— the endpoint now only caches and responds for successful (vision-confirmed) results. All other outcomes (4xx, 5xx, network errors) fall through to the existingcatchblock, which logs but does not cache.router.test.tsthat validated the old caching-on-failure behavior:returns false when model lacks visionreturns false when model is not foundreturns 502 without caching when upstream returns 5xxImpact
✔️ Checklist