Conversation
JslYoon
requested review from
a team,
asmasarw,
jkilzi,
karthikjeeyar,
mareklibra,
rohitkrai03 and
yangcao77
as code owners
September 17, 2026 03:34
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 <[email protected]> Assisted-by: Claude Opus 4.8 Co-Authored-By: Claude Opus 4.8 <[email protected]>
JslYoon
force-pushed
the
perf-models-vision-probe-background
branch
from
September 17, 2026 03:39
2a148c1 to
c737658
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4839 +/- ##
==========================================
- Coverage 63.60% 60.14% -3.46%
==========================================
Files 2685 2673 -12
Lines 107077 106101 -976
Branches 30010 29801 -209
==========================================
- Hits 68101 63819 -4282
- Misses 37165 41772 +4607
+ Partials 1811 510 -1301
*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:
|
|
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
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