Skip to content

fix(server): report undecodable tool calls across APIs - #3690

Open
Jaeyeong-CHOI wants to merge 2 commits into
lablup:mainfrom
Jaeyeong-CHOI:fix/3626-tool-call-parse-error
Open

Jaeyeong-CHOI wants to merge 2 commits into
lablup:mainfrom
Jaeyeong-CHOI:fix/3626-tool-call-parse-error

Conversation

@Jaeyeong-CHOI

Copy link
Copy Markdown
Contributor

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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: Report undecodable tool calls as tool_call_parse_error

1 participant