Repository navigation
Studio: one request per chat model load, sent to both /validate and /load - #15139
Conversation
|
Reached Codex review convergence at oobabooga#413. |
|
@codex review |
1 similar comment
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
The model picker, the compare pane and auto-load each built two payloads from the same settings: one for the
/validatepreflight and one for/load.validateModelthen re-serialized the first through a hand-kept allow-list. That is 13 payload literals acrossuse-chat-model-runtime.ts,shared-composer.tsx,chat-adapter.tsandchat-api.ts, and every new load setting had to be added to each one.The history shows the copies drifting apart:
chat-api.tsseparately.The preflight exists so Studio refuses a load before it unloads the working model, and also to guard training. When
/validatejudges a different command from the one/loadruns, it approves a load that/loadthen refuses after the unload, or refuses one that would fit.Changes
LoadModelRequestand sends it to both/validateand/load. Only the load-only fields are added at the/loadcall: request id, lease, force flags andalongside./validate's body is the load request; the route ignores load-only fields.validateRequestBodyfills defaults for the non-nullable fields only.llamaServerLoadFieldsowns the one rule for llama-server's knobs, which the three paths used to spell out with slightly different gating:/validate, instead of mirroring that reset in a second set ofvalidate*variables.lib/load-request.tsholds the three helpers. Production code is 225 lines shorter.Preflight and load now agree
/validate.validateModeldroppedctx_checkpoints,spec_draft_cache_typeandtensor_split. Checkpoints affect sizing; a load with Checkpoints set was priced at the default 32. Forwarding the draft KV dtype and GPU split makes validation apply the same explicit-setting precedence over inherited flags as loading. The training coexistence guard does not directly price draft KV memory.speculative_typeandspec_draft_n_max, so validation used the default Auto mode, which already counts some drafters but can differ from the selected mode. The preflight now receives the same selected values as loading. Auto-load already sent them./loadused the staged layer count and context length.Validation
chat-api.tsof each checkout, comparing what/validatereceives with what/loadreceives. Onmain,/validateis missingtensor_split,spec_draft_cache_typeandctx_checkpoints; here it is missing nothing.chat-load-request-one-builder.test.tsreadsValidateModelRequestfromstudio/backend/models/inference.py. It fails if any field it prices cannot rideLoadModelRequestor is not forwarded. It also table-tests the llama-server knob rule and checks that every path sends one request.npm testgives 13,857 passed. The 3 failures are HTML/TextEdit charset decoding tests that fail the same way onmainin this environment. Typecheck is clean with bothbun checkandtsc.tests/studiothat read these sources give 807 passed and 63 skipped. The two Playwright files cannot import here, onmaintoo.test_chat_autoload_failure_gate.py) now inlines the realload-request.tsinstead of a copy; all 81 scenarios pass./validatesent none of the three; used default checkpoints and could resolve inherited flags differently/load/load/loadNot in this PR: auto-load still ignores a model's saved engine (vLLM/SGLang) and loads it on the default engine. That looks deliberate (background loads avoid starting a managed engine), so it is left as is.