Skip to content

fix: paint the Video Gen model picker without waiting on the python probe (#5835) - #6048

Merged
atomantic merged 1 commit into
mainfrom
claim/issue-5835
Sep 3, 2026
Merged

fix: paint the Video Gen model picker without waiting on the python probe (#5835)#6048
atomantic merged 1 commit into
mainfrom
claim/issue-5835

Conversation

@atomantic

Copy link
Copy Markdown
Owner

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-context returns { 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. /status keeps returning the same fields for its other readers, and both routes build them from one shared videoModelContext() helper so the two cannot drift.

Client. VideoGen.jsx fetches the new route alongside getVideoGenStatus() on mount; /status is now responsible for connectivity alone. useVideoGenForm takes a modelContext argument instead of status — 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.js has no work left to do and is deleted, along with its barrel/README rows, its stale flag, and the statusFresh gate 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 on GET /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 /status is 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 /status is 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.
  • Four sibling VideoGen page suites updated for the new mount fetch; the runtime-install case now asserts both halves refresh, since an install moves the hardware decoration and python health.
  • Full suites green: client 10,124 passed / 2 skipped; server 38,296 passed / 14 skipped. apiRouteCatalog.generated.json regenerated for the new route.

Review status

⚠️ The required local reviewer for this run could not produce a verdict — see the comment below.

https://claude.ai/code/session_012krsCGMnjFmoeY9uyi4Ypf

@atomantic

Copy link
Copy Markdown
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.

@atomantic

Copy link
Copy Markdown
Owner Author

Reviewer failure detail, for whoever re-runs it: the pinned local reviewer (ollama, model …gemma-4-12B-coder…:Q4_K_M, effort low) returns HTTP 400 from the Ollama API — "<model>" does not support thinking. Reproduced twice against the same diff via server/scripts/run-local-code-review.mjs; no verdict was produced, so no self-review was substituted. The effort level maps to a thinking parameter this GGUF build does not accept. Both full test suites are green (client 10,124 / server 38,296) and the branch is otherwise ready.

…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
atomantic merged commit c43eccd into main Sep 3, 2026
12 checks passed
@atomantic
atomantic deleted the claim/issue-5835 branch September 3, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Serve the Video Gen model list off /video-gen/models instead of the python-probe /status payload

1 participant