Repository navigation
fix(openai): accept null tool_call arguments in streaming chunks - #9035
Merged
Merged
Conversation
jh-block
approved these changes
May 6, 2026
lifeizhou-ap
added a commit
that referenced
this pull request
May 7, 2026
…-refactor * origin/main: refactor: switch to official new rust-sdk for ACP (#9062) refactor(goose2): remove attachment preamble (#9052) Align CODEOWNERS with pull request review rules in GOVERNANCE.md (#9056) bring MAINTAINERS.md up to date (#9053) feat(acp): expose built-in skills through sources list acp calls (#9045) add provider-first onboarding (#9039) feat: ACP streamable http spec compliance (#9034) Skip automatic fix which crashes (#9036) fix(openai): accept null tool_call arguments in streaming chunks (#9035) Signed-off-by: Lifei Zhou <[email protected]> # Conflicts: # ui/goose2/src/features/chat/hooks/useChat.ts
This was referenced May 14, 2026
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.
Summary
DeltaToolCallFunction.argumentsis aStringwith#[serde(default)].serde(default)only fires when the field is missing, so a streaming chunk that sends"arguments": null(deepseek-v4-pro in #8991) blows up the whole chunk parse withinvalid type: null, expected a stringand the tool call gets dropped.Add a
deserialize_null_default_stringhelper that maps both missing and explicitnullto"", and use it onarguments. The field stays aString, so thepush_str/ clone sites that concatenate streaming deltas don't change.Kept it as
Stringrather than switching toOption<String>so the change is local to this one field and doesn't ripple through the streaming accumulator.Testing
test_delta_tool_call_function_accepts_null_argumentscovering thenull, missing, and populated cases.cargo test -p goose --lib providers::formats::openaiRelated Issues
Fixes #8991