Repository navigation
0861: structured output hands cancel_event over once (GGUF 'got multiple values') - #10
Merged
Merged
Conversation
…GUF lane got it twice)
…ed (plain structured branch, hybrid second pass); the hybrid first pass keeps the raw kwarg; test
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.
0861: Structured output hands the host's cancel event over once (GGUF "got multiple values")
Status: completed 2026-10-29 (unreleased; ships with the next AbstractCore release).
Found by: the OVH release-test server (AbstractCore 2.31.0, gateway 0.17.0): every structured call on
unsloth/gemma-4-E4B-it-GGUF(HuggingFaceProvider, GGUF lane) failed withHuggingFaceProvider._generate_gguf() got multiple values for keyword argument 'cancel_event'.Cause
BaseProvider.generateconsumes the host'scancel_event=in the plain path's retry loop and forwards it asCANCEL_KWARG(_cancel_event); structured output (response_model=) branches off earlier, so the rawcancel_eventkwarg travelled through the structured handler into_generate_internal. The HuggingFace providerpops
_cancel_eventand passescancel_event=explicitly to its lane, with the raw one still in**kwargs.Fix
The structured branch pops
cancel_eventand passes it underCANCEL_KWARGto providers that support generationcancel (drops it for the others, which would forward an unknown kwarg into their payload).
Evidence
tests/providers/test_generation_cancel_unit.py::test_structured_output_hands_the_cancel_event_over_once(both acancel-capable and a plain provider; red without the fix);
tests/providers+tests/structured: 1773 passed.