Repository navigation
fix(server): report undecodable tool calls across APIs - #3690
Open
Jaeyeong-CHOI wants to merge 2 commits into
Open
Jaeyeong-CHOI wants to merge 2 commits into
Jaeyeong-CHOI wants to merge 2 commits into
Conversation
This branch has not been deployed
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.
Report undecodable tool calls across server APIs
Fixes #3626. Chat, Responses and Anthropic now distinguish an ordinary text answer from a generation that attempted a tool call but produced no usable call. This applies to both buffered and streamed requests: a failed stream ends with its API’s error event rather than reporting success. A valid sibling is still returned, and reaching the output-token limit is not a parser failure.
The parser records rejected calls after recognizing a tool-call region. Python REPL prompts, Markdown quotes and prose action notes are not Functionary or Command R invocations; regression tests cover these alongside malformed calls.
Verification on DGX Spark: formatting and workspace all-target Clippy passed with default features and with CUDA. The CPU route filter passed 673 tests (one ignored), and the tool_calls filter passed 586. With CUDA enabled, all 16 scripted route tests and all 568 parser-module tests passed. These are scripted-provider tests, not live model inference. The unfiltered workspace test suite was not run.