Repository navigation
feat(gateway): carry each model's context size to the harness - #308
Merged
Merged
Conversation
…ness's limits from it
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.
A harness launched through a fleet gateway now shows the window the engine actually serves — and the output limit derived from it — instead of the harness's schema default.
Summary
contextSizein their replies (from the stored deploy config), alongside the runner and served name./v1/statusand/v1/metricsreport it.contextSizefrom the control plane, so a cloud node's facts carry it like a local node's.GET /v1/modelslists each model with the context size the gateway knows — the running node's report, or the size the config a wakeable stopped node would start with declares — as an extra field clients ignore.DiscoveredModelsis now typed ({ID, ContextSize}); a discovered model the gateway reports a size for is written withlimit: {context, output}— the context as reported, the output derived the same way a Spinloop applies it (a quarter of the context, minimum 1) — and one with no reported size is listed unlimited.Implementation details
contextsize.DefaultOutput(context)— the same derivation the Spinloop apply uses — so the harness shows a window and a matching output limit rather than the harness's own default (opencode's 200000/32000).cloud-vm-llmStatsFn and StartFn updated). The gateway stack was redeployed with the new binary; the deployed gateway reportsqwen3.8-27bwithcontextSize: 196608, and a launch through it writeslimit: {context: 196608, output: 49152}into the harness config.