Repository navigation
server: expose effective context in model discovery - #483
Merged
Merged
Conversation
akol1
marked this pull request as ready for review
October 7, 2026 16:00
grearjake-star
added a commit
to grearjake-star/TensorFold
that referenced
this pull request
Oct 8, 2026
…ngth, max_model_len) /v1/models carried only ids, so model-catalog clients (magpie, Codex's context indicator and others) could not discover the window the server admits, although /health already reports it. Each entry, for the served name and every alias, now carries context_length and vLLM's max_model_len, both equal to the app's effective prompt-plus-reply window; a window the engine does not know omits both fields rather than guessing, and the reply limit is never substituted for it. Upstream: requested in ashhart#480 (reported on a DGX Spark); the maintained-branch design is akol1's ashhart#483 for the Zig server. Written fresh for the Python CUDA server. Credit: nullburn (the report), akol1 (the contract this follows).
Owner
|
Thanks @akol1 for effective context in model discovery. The local integration passed the all-target build, host/native/golden tests and three-platform host builds, with no additional lean findings. We retained your original commits and kept our integration changes separate. |
8 tasks done
BlivionIaG
pushed a commit
to BlivionIaG/TensorFold
that referenced
this pull request
Oct 20, 2026
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.
Model-catalog clients currently cannot discover the configured context through
/v1/models. Report equalcontext_lengthandmax_model_lenextensions from the loaded engine's effective prompt-plus-reply limit for every served name and alias. An unspecified window omits both fields. The default reply limit is never substituted for context capacity.Related to #480 on the maintained native branch; the frozen Python implementation is unchanged.
The patch documents the contract, tests fitted contexts, aliases, unspecified capacity and the full u32 range, and updates only the affected model-list golden bodies and HTTP lengths.
Validation on the pinned Zig 0.17.0:
zig build test-golden -Dcpu=apple_m1: 312/319 equal, seven existing known differences, zero unexpected differences.The full
test test-goldenbaseline is blocked by the unavailable Xcode Metal compiler. The golden harness emits inherited allocator-leak diagnostics on both baseline and candidate. No checkpoint/device performance qualification is claimed; no model-serving configuration or GPU computation changes. This draft makes those validation limits explicit for review.Publication review covered the full tracked tree, changed fixtures and outgoing commit identity. No private operator identifiers, paths, credentials, prompts, model weights or runtime logs are included.