Repository navigation
Studio: pin the /status chat template echo behaviour - #8080
Merged
danielhanchen merged 2 commits intoAug 7, 2026
Merged
Conversation
#8074 fixed the duplicate-keyword TypeError and added a source-level contract that no runtime field is also passed as an explicit keyword at a splat site. That contract cannot see the value, so the assignment it relies on can be dropped without failing it. Removing `_runtime_fields["chat_template_override"] = ...` leaves the contract test green while /status starts reporting the raw backend value. An auto-applied bundled family template then reads as a user override, and the frontend re-sends it for the next, unrelated model. Adds two cases to the existing loaded-GGUF status tests: the user override is echoed, and an auto-applied template still reports None.
shimmyshimmer
force-pushed
the
fix/gguf-status-duplicate-chat-template-override
branch
from
August 7, 2026 04:26
87cac47 to
91518f7
Compare
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ 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". |
danielhanchen
deleted the
fix/gguf-status-duplicate-chat-template-override
branch
August 7, 2026 08:21
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.
Context
This started as a fix for the
/api/inference/status500, but #8074 landed that first. Rebased onto it, so the source fix is gone and only the missing test coverage is left.What is still missing
#8074 added a source-level contract: no runtime field is also passed as an explicit keyword at a
**_llama_runtime_fields(...)splat site. That is the right guard for the collision that caused the 500, but it reads source text, not values, so it cannot see whether the assignment it relies on is still there.Delete the line #8074 added:
and the contract stays green, because there is no explicit keyword to collide with.
/statusquietly starts reportingllama_backend.chat_template_overrideraw. The auto-applied bundled family template thatget_statusdeliberately reports asNonenow reads as a user override, the frontend adopts it as editable state, and re-sends it as an explicit override for the next, unrelated model. That is the exact behaviour the surrounding comment says must not happen.Verified on this branch with that one line removed:
The failure is
test_an_auto_applied_chat_template_is_not_reported_as_the_users.Change
Two cases added to
tests/test_inference_status_loaded_gguf.py, which already drives the realget_statushandler against the real response model:NoneNo source changes. The first case is the weaker of the two on its own, since the projected value and the expected value coincide there, but it documents the intended contract next to the one that catches the regression.
Note
The original diff here duplicated #8074 (same approach, assign into the dict before splatting). Reduced rather than closed, since the behavioural gap above is real and unclaimed. Happy to close instead if you would rather fold these into the contract file.