Problem
GET /api/video-gen/status welds three unrelated things into one response: python health (a subprocess probe, ~1–2s), the hardware-aware model list, and the model-shaping numbers (defaultModel, systemMemoryGb, fflfLtx2PixelBudget). The Video Gen page needs the model list to render its Model picker, so the picker waits on the python probe.
A first fix landed in client/src/pages/VideoGen.jsx + client/src/lib/videoGenStatusCache.js: the field now holds its place with a loading placeholder, and a session cache paints the previous model list immediately on a revisit. That covers the second-and-later loads, but a cold load (new tab / new session) still waits on the probe before any model appears.
GET /api/video-gen/models (server/routes/videoGen.js, router.get('/models')) already returns hardwareAwareVideoModels() with no python probe — and listVideoModels() in client/src/services/apiImageVideo.js already wraps it with the same hardware filter. The sibling ImageGen page is already shaped this way (listImageModels() from its own mount effect, separate from refreshStatus()), which is why it does not have this problem.
Work
- Add the model-shaping fields the picker's auto-select needs to the
/video-gen/models response — defaultModel, systemMemoryGb, and fflfLtx2PixelBudget — either as a wrapper object (breaking the current bare-array shape, so version-gate it) or as a sibling GET /video-gen/model-context. Keep /status returning them too; other callers read them there.
- In
VideoGen.jsx, fetch that alongside getVideoGenStatus() on mount and let it drive models + the auto-select inputs. /status keeps owning connectivity only.
- Once the model list no longer rides the probe, re-evaluate
client/src/lib/videoGenStatusCache.js: if the decoupled fetch is fast enough that the picker paints immediately, delete the cache, its barrel/README rows, the stale flag and the statusFresh gate in VideoGen.jsx, and the two cache-specific cases in client/src/pages/VideoGen.modelLoading.test.jsx. Keep the loading-placeholder case either way.
Decisions already made
- Do NOT cache
resolveLocalPythonHealth server-side. The route comment states the invariant: it probes package imports on every call so a half-installed python cannot masquerade as connected.
- Keep the
loading prop on client/src/components/ModelSelect.jsx regardless — a slow list is a property of the shared picker, and the placeholder is what keeps the form from jumping.
Problem
GET /api/video-gen/statuswelds three unrelated things into one response: python health (a subprocess probe, ~1–2s), the hardware-aware model list, and the model-shaping numbers (defaultModel,systemMemoryGb,fflfLtx2PixelBudget). The Video Gen page needs the model list to render its Model picker, so the picker waits on the python probe.A first fix landed in
client/src/pages/VideoGen.jsx+client/src/lib/videoGenStatusCache.js: the field now holds its place with a loading placeholder, and a session cache paints the previous model list immediately on a revisit. That covers the second-and-later loads, but a cold load (new tab / new session) still waits on the probe before any model appears.GET /api/video-gen/models(server/routes/videoGen.js,router.get('/models')) already returnshardwareAwareVideoModels()with no python probe — andlistVideoModels()inclient/src/services/apiImageVideo.jsalready wraps it with the same hardware filter. The sibling ImageGen page is already shaped this way (listImageModels()from its own mount effect, separate fromrefreshStatus()), which is why it does not have this problem.Work
/video-gen/modelsresponse —defaultModel,systemMemoryGb, andfflfLtx2PixelBudget— either as a wrapper object (breaking the current bare-array shape, so version-gate it) or as a siblingGET /video-gen/model-context. Keep/statusreturning them too; other callers read them there.VideoGen.jsx, fetch that alongsidegetVideoGenStatus()on mount and let it drivemodels+ the auto-select inputs./statuskeeps owning connectivity only.client/src/lib/videoGenStatusCache.js: if the decoupled fetch is fast enough that the picker paints immediately, delete the cache, its barrel/README rows, thestaleflag and thestatusFreshgate inVideoGen.jsx, and the two cache-specific cases inclient/src/pages/VideoGen.modelLoading.test.jsx. Keep the loading-placeholder case either way.Decisions already made
resolveLocalPythonHealthserver-side. The route comment states the invariant: it probes package imports on every call so a half-installed python cannot masquerade as connected.loadingprop onclient/src/components/ModelSelect.jsxregardless — a slow list is a property of the shared picker, and the placeholder is what keeps the form from jumping.