[Bugfix][Structured Output] Feed the token that implicitly ends reasoning to the grammar (#59627)
Signed-off-by: Simon Veitner <sveitner@redhat.com> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Co-authored-by: Misha Goin <mgoin64@gmail.com> Co-authored-by: Yifan Zong <263738792+yzong-rh@users.noreply.github.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
Misha Goin
Yifan Zong
parent
bab0ac61f8
commit
c23ca06b6d
@@ -643,8 +643,8 @@ class TestImplicitReasoningEnd:
|
||||
# token-ID fast path; the implicit tool-call exit still goes through
|
||||
# the text lexer.
|
||||
assert thinking_parser.reasoning_end_token_ids == {_THINK_END_ID}
|
||||
assert thinking_parser.find_reasoning_end_offset([7, _THINK_END_ID, 8]) == 1
|
||||
assert thinking_parser.find_reasoning_end_offset([7, 8]) == 2
|
||||
assert thinking_parser.find_reasoning_end([7, _THINK_END_ID, 8]) == (1, False)
|
||||
assert thinking_parser.find_reasoning_end([7, 8]) == (2, False)
|
||||
|
||||
def test_streaming_reasoning_implicit_end(self, thinking_parser):
|
||||
chunks = [
|
||||
|
||||
Reference in New Issue
Block a user