fix: paint the Video Gen model picker without waiting on the python probe (#5835) - #6048
Merged
Conversation
Owner
Author
|
Required code review was not completed before publication. This PR is intentionally left open and will not be merged until the required review completes. |
Owner
Author
|
Reviewer failure detail, for whoever re-runs it: the pinned local reviewer ( |
…robe (#5835) Opening Video Gen in a new tab left the Model field on a "Loading models…" placeholder for a second or two before the picker appeared. The list rode along on GET /api/video-gen/status, which shells out to python on every call to check package imports — so the form waited on an interpreter probe it did not need in order to render a dropdown. The model list and the three numbers its auto-select reads (defaultModel, systemMemoryGb, fflfLtx2PixelBudget) now come from a new probe-free GET /api/video-gen/model-context, fetched alongside /status on mount. Both routes build that payload from one shared helper, so they cannot drift, and /status keeps returning the fields for its existing readers. /status is now responsible for connectivity alone, and the form hook takes a `modelContext` argument instead of `status` to make that split structural. With the list no longer behind the probe, the session cache that used to paint a stale picker on a revisit has no work left to do and is deleted — along with its `stale` flag and the freshness gate the connectivity UI needed to avoid reporting python health from a stored answer. Claude-Session: https://claude.ai/code/session_012krsCGMnjFmoeY9uyi4Ypf
atomantic
force-pushed
the
claim/issue-5835
branch
from
September 3, 2026 15:23
8f18d9a to
cbe5cb4
Compare
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
Opening Video Gen in a new tab left the Model field on a "Loading models…" placeholder for a second or two before the picker appeared. The list rode along on
GET /api/video-gen/status, which shells out to python on every call to check package imports — so the form waited on an interpreter probe it did not need in order to render a dropdown. (A session cache shipped earlier covered the second visit; a cold load still waited.)Server. New probe-free
GET /api/video-gen/model-contextreturns{ models, defaultModel, systemMemoryGb, fflfLtx2PixelBudget }— the model list plus the three numbers the picker's auto-select reads — off the registry and the already-cached hardware probe alone. It is a sibling route rather than a change to/models, so that route's long-standing bare-array shape stays intact for its existing callers and for an older client talking to a newer server./statuskeeps returning the same fields for its other readers, and both routes build them from one sharedvideoModelContext()helper so the two cannot drift.Client.
VideoGen.jsxfetches the new route alongsidegetVideoGenStatus()on mount;/statusis now responsible for connectivity alone.useVideoGenFormtakes amodelContextargument instead ofstatus— it only ever read those three fields — which makes the split structural rather than a convention.Cleanup. With the list no longer behind the probe,
client/src/lib/videoGenStatusCache.jshas no work left to do and is deleted, along with its barrel/README rows, itsstaleflag, and thestatusFreshgate the connectivity UI needed so a stored answer could never report python health.Closes #5835
Test plan
server/routes/videoGen.test.js— two new cases onGET /model-context: it serves the full field set and the python package probe is never called in that request path; and every field it shares with/statusis byte-equal, so the shared builder is pinned.client/src/pages/VideoGen.modelLoading.test.jsx— reworked. The two cache-specific cases are gone; a cold-load case asserts the picker is enabled and holding the default model while/statusis still in flight and the banner still reads "Checking…", and a new case asserts a failed context fetch takes the Model field away rather than parking on the placeholder forever. Verified these fail against the pre-fix wiring (2 of 3 red) and pass after.apiRouteCatalog.generated.jsonregenerated for the new route.Review status
https://claude.ai/code/session_012krsCGMnjFmoeY9uyi4Ypf