feat(client): preserve paired routing weights for Total Router Recall - #154
Draft
faresobeid wants to merge 1 commit into
Draft
feat(client): preserve paired routing weights for Total Router Recall#154faresobeid wants to merge 1 commit into
faresobeid wants to merge 1 commit into
Conversation
Keep compact expert IDs and FP32 coefficient data paired while parsing token responses, without dropping usage metadata or changing the JSON fallback. Assisted-by: Prime Agent
This was referenced Sep 9, 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.
Summary
memoryviews in compact/inference/v1/generateresponses. Keep metadata and legacy IDs-only payloads unchanged.Scope and companions
This is the renderer transport portion of the experimental Total Router Recall MVP, not router capture or trainer replay. Semantic routing validation belongs downstream. Full-coefficient replay remains single-turn and non-forked; the companion verifier path rejects reused-prefix continuation/forks. This parser does not enforce that graph guard or add multi-turn support. Legacy IDs-only behavior remains supported.
Related #79 transports Dynamo expert IDs, not routing coefficients. This change does not add Dynamo support.
Validation
Fresh main:
06bcf635f4b582216fbb225eb4ed2e5c84fad7fe.uv run --frozen pytest tests/test_client_routing.py tests/test_client.py -q -rs: 78 passed, 5 skipped. The skips are existing optional vLLM feature-serialization tests; vLLM is not installed in this renderer environment. Normal conftest loading succeeded.uv run --frozen ruff checkanduv run --frozen ruff format --check: passed.git diff --cached --check: passed.--noconftest; it was not rerun here. This revision collects 83 cases, including current main's extra usage case and two added paired-usage cases.These are focused CPU transport tests. No full renderer suite, live server, GPU, end-to-end numerical parity, performance, or training-quality qualification is claimed.
AI assistance
AI assistance was used to prepare and review this patch, add regression coverage, run checks, and draft this description.
Note
Preserve paired routing weights as raw-backed memoryviews in
parse_generate_responsememoryviews over the original response bytes without copying.parse_generate_responsenow returnsmemoryviewobjects (notbytesorstr) for compact routing ID and weight fields in client.py; in-tree consumers are updated, but out-of-tree callers expecting concretebyteswill need to adapt.Macroscope summarized fa5624c.