Conversation
Changed Packages
|
The /v1/models handler probed each LLM's vision support inline, awaiting up to VISION_PROBE_TIMEOUT_MS per model, so a cold cache could delay the response by ~10s. Serve vision support from the capabilities cache instead: warm the cache at router startup and probe cache misses in the background (deduped per model), returning the model list immediately. The cache self-heals on a miss — a model new to the LCS list, or one whose previous probe failed and was not cached. Signed-off-by: Lucas <lyoon@redhat.com> Assisted-by: Claude Opus 4.8 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2a148c1 to
c737658
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4839 +/- ##
==========================================
- Coverage 63.81% 60.12% -3.69%
==========================================
Files 2698 2672 -26
Lines 107951 106032 -1919
Branches 30234 29773 -461
==========================================
- Hits 68888 63757 -5131
- Misses 38541 41765 +3224
+ Partials 522 510 -12
*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:
|
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 3:37 PM UTC · Completed 3:52 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $4.05 |
|
Risk Assessment: moderate (2/5) DetailsSmall, well-tested performance refactor (3 files, 253 lines, 0.33 test ratio) with no security or dependency concerns, but the core router files show moderate multi-author contention and a handful of recent fix commits, yielding a moderate composite risk. |
ReviewFindingsHigh
Low
Next steps:
|
Signed-off-by: Lucas <lyoon@redhat.com>
|



Summary
GET /v1/modelsprobed each LLM's vision capability inline, awaiting up toVISION_PROBE_TIMEOUT_MS(10s) per model. On a cold cache this delayed the response by up to ~10s.This change serves vision support from the capabilities cache and moves probing off the request path:
supportsVision: false) immediately and triggers a single background probe (deduped per model via an in-flight set).The per-user
POST /v1/validate-model-visionpath is unchanged (it still awaits, since it needs the answer).Behavior change
On a cold cache, an LLM may report
supportsVision: falsefor the brief window between the first request and the background probe completing; the next request reports the real value.Testing
supportsVision enrichmentsuite for the non-blocking + warm-on-boot contract; added coverage for startup warm-up and lazy self-heal when the LCS list changes.yarn backstage-cli package test— 335/335 pass.yarn tsc:full— clean./v1/modelsreturns in ~50ms (was up to 10s), fully enriched.🤖 Generated with Claude Code