Verdict: worth it with changes
The capability is needed, the layer is right, and this is the smallest-footprint version of the change yet: after the rebase onto #545's compositional RecipeParameters, the whole thing is 6 files, ~+30 code, +37 test, and the flag, --help row, manifest entry and SCOPE_DEPLOYMENT scope all come for free from the shared parameter machinery. Omitting the flag is a strict no-op (prepared_context returns recipe.context). But two defects make the PR's own new test fail, and one exports a core Helios refuses to load after a full GPU preparation.
What it does, verified on the head
ignition/parameters.py:1309-1321—context_targetas a base-classparam(...)withflag="--request-context",min_value=1,max_fn=_recipe_context_limit,manifest_key,DEPLOYMENTscope,repro_always=True. Registration, parsing, help and manifest emission come from #545.ignition/planning.py:357-363—prepared_context: recipe max when no target, elsemin(recipe.context, target). The export-hosttokensterm flagged last round is gone, so the same recorded flags rebuild the same core anywhere.ignition/planning.py:186-190— the page-multiple check that was missing last round now exists;:212(bench) comparesrequired_contexttoprepared_context.ignition/preparation/bootstrap.py:132—"context": plan.prepared_context→BasePreparationConfig.context(:33) → Heliosprepared_sequence_tokens(helios/src/server/config.rs:131) andlimits.max_sequence_tokens(:148), enforced at admission (server/request.rs:349-363), advertised asmax_model_len(server/models.rs:81), pool-clamped at load (model.rs:261-273).ignition/cli/serve.py:67-68—max_body_bytesnow usesprepared_context(last round's should-fix, done). No Helios change, no per-model branch, no new mechanism.
Blockers
--request-contextnever reachesreproduction_args, so the new test fails attests/cli/test_planning.py:324and the manifest's reproduction command rebuilds an uncapped core — exactly the #454 objection.RecipeParameters.reproduction_args(parameters.py:1469) overrides the base implementation, emits base fields by hand (:1483-1484,:1522-1527), and then skips every base-class field in its generic loop::1491buildsbase_field_namesfromfields(RecipeParameters)and:1494continues when the name is in it.context_targetis a base field, sorepro_always=Trueon it is dead. The manifestparameterslist does carrycontext_target(basemanifest_parameters,:596-616, has no such skip), so artifact and reproduction command disagree — proof it is an oversight. → Emit it beside--prefill-chunk-sizeat:1484.- An oversized target is rejected, contradicting the docs row and the PR's own test (
tests/cli/test_planning.py:310-313).max_fn=_recipe_context_limit(:1268-1269, wired at:1316) returns the recipe context, sovalidate_fields(:533-545) raises "--request-context for ALIAS must be 1 through 262,144" forcontext_target=500000. Butplanning.py:363promisesmin(recipe.context, target), anddocs/cli-design.md:468says "resolves to the smaller of N and the recipe maximum". The test asserts acceptance. → Dropmax_fnfromcontext_target(keep it onprefill_chunkat:1301) and align the page check to the value actually served —min(self.recipe.context, target) % self.page_tokens(planning.py:187-190) — because500000 % 64 == 32, so the current check alone still rejects it. With that pair, lines 310-313 and 319-321 both pass unchanged. (Thetarget=0case at:315-317still tripsmin_value=1first, so it stays valid.) - A cap below the prefill chunk exports a core Helios refuses to load. Helios rejects
prefill_chunk_size > max_sequence_tokens(helios/src/scheduler.rs:66-77, viamodel/catalog.rs:42afterfit_context). Export writesprefill_chunk_size = parameters.prefill_chunk(bootstrap.py:45-46; default 4096) andmax_sequence_tokens = prepared_context. Ignition never compares the two against the cap:RecipeParameters.validatecompares the chunk toctx.recipe.context(parameters.py:1458-1462) andplan()compares toresult.context(planning.py:594-596) — neverprepared_context. Soignition export qwen3.8-27b --request-context 2048plans cleanly, spends the entire GPU preparation, thenflare runfails "invalid prepared model configuration". → Validateprefill_chunk <= prepared_contextinPlan.__post_init__beside the page check, naming--request-context.
Should fix
planning.py:320-321—demand_pagesstill usesrecipe.context, so the printed/to_dictKV demand overstates the very number this flag lowers.Plan.to_dict(planning.py:379-416) carriescontext,checkpoint_contextandcontext_targetbut noprepared_context, andcontext_targethas nostatus_label, so the "Select GPUs" line (serve.py:268-272,parameters.py:1540-1562) never mentions the cap. A capped export and a stock one differ in reporting only bycontext_target.docs/cli-design.md:468should say a cap also lowers the default output allowance (max_new_tokensdefaults tomax_sequence_tokens,server/config.rs:210-213) and must be at least the prefill chunk.- Evidence is mode-scoped: under the default
--kv-cache-limit memory,page_ceilingreturnsOk(None)(runtime_core/memory.rs:290-292) and pages fill free VRAM, so the VRAM table holds only with--kv-cache-limit context|concurrency(the commands used it; the claim does not say so). Add the case only this flag can produce: a request between cap and recipe max rejected by the capped core and accepted by stock, plus a smallermax_model_lenin/v1/models. - No test pins the seam that actually changes the core — add
common_preparation_kwargs(plan)["context"] == plan.prepared_contextattests/cli/test_commands.py:150-155.
Charter mapping
- Merged-PR criteria: addresses a maintainer request — #454's review by
yatesdrnamed exactly these requirements — and a measured memory issue with commands, revision, model and an SM120 card. - Right layer (#404): the runtime genuinely cannot do this.
--kv-cache-limit context|concurrency(runtime_core/memory.rs:284-331) and--memory-limitshape the pool;max_sequence_tokens/max_model_lenare baked at export. An honest under-capacity advertisement is an export-time decision. - No per-model branches: one field on the shared base
RecipeParameters; every recipe inherits it; zero Helios change. - No duplication: nothing else lowers the admission ceiling; doing it "without new code" would mean minting recipe variants.
- Cost: ~30 lines, no runtime or CUDA path, no catalog or state-transition risk. Benefit: modest but real for the vision's core case (one long-context model on an SM120 workstation or DGX Spark) — trade per-request ceiling for concurrency and advertise an honest
max_model_len. Risk: low once blocker 3 is fixed; today an undersized or oversized target fails after full preparation.
Bottom line
Merge once (1) --request-context is emitted in RecipeParameters.reproduction_args, (2) an oversized target clamps and the page check validates the served min(recipe.context, target), and (3) a cap below the prefill chunk is rejected before preparation. The reporting/docs gaps are one revision of the description plus one line of docs; none touch the design, which is well placed, general, and a no-op by default.