Skip to content

Conversation

@jamadeo
Copy link
Collaborator

@jamadeo jamadeo commented Jul 23, 2025

Previously this did not properly handle when the provider streams back a reply with >1 tool call.

The stream used here for the test was captured with a simple proxy. We should consider doing more of this, perhaps building out something like the scenario test to capture at the request level to test this provider code.

@jamadeo jamadeo requested a review from DOsinga July 23, 2025 17:26
if let Some(index) = delta_call.index {
if let Some((_, _, ref mut args)) = tool_call_data.get_mut(&index) {
args.push_str(&delta_call.function.arguments);
} else if let (Some(id), Some(name)) = (&delta_call.id, &delta_call.function.name) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need this branch?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this is actually the part that we missed before--you'd think it's the tool_calls array but that still has a single item in the first part of the response. Then the subsequent chunks might start new calls by setting a new index and id

@jamadeo jamadeo merged commit ed282ba into main Jul 23, 2025
8 checks passed
@jamadeo jamadeo deleted the jackamadeo/multi-tool-call branch July 23, 2025 22:48
zanesq added a commit that referenced this pull request Jul 23, 2025
….1.4

* 'release/1.1.4' of github.com:block/goose:
  fix: multi-tool calls in streamed openai-compatible responses (#3609)
lifeizhou-ap added a commit that referenced this pull request Jul 24, 2025
* main: (28 commits)
  fix: multi-tool calls in streamed openai-compatible responses (#3609)
  feat: subagent turn count, simple agent loop (#3597)
  feat: subagent independent extension manager (#3596)
  Improve session history loading resiliency (#3588)
  Added logging and changed default route case to not redirect to home when there is an invalid route (#3610)
  fix: chat sidebar layout overlapping content occasionally (#3590)
  fix: loading shared sessions (#3607)
  docs: use installer component for tutorial, add updating extensions section (#3608)
  fix: show token alert popover during agent responses and agent failure cases (#3536)
  reuse the cancellation token in the agent level (#3599)
  Docs: Move MongoDB tutorial to MCP section (#3602)
  docs: desktop recipe format (#3594)
  Fix model display name not being updated immediately after leaving settings (#3587)
  Added option to summarize the chat when an error is triggered (#3598)
  Remove mcp_macros and unused types (#3581)
  fix: add fallback id to messages if none provided (#3584)
  feat: migrate ErrorData from internal mcp crates to rmcp version (#3586)
  fix: adjust subrecipe description to allow running tests (#3585)
  Scenario tests (#3430)
  feat: migrate JsonRpcMessage/Request/Response/Error/Notification from internal mcp crates to rmcp versions (#3564)
  ...
michaelneale added a commit that referenced this pull request Jul 24, 2025
* main:
  Goose security updates (#3579)
  fix: multi-tool calls in streamed openai-compatible responses (#3609)
  feat: subagent turn count, simple agent loop (#3597)
  feat: subagent independent extension manager (#3596)
  Improve session history loading resiliency (#3588)
  Added logging and changed default route case to not redirect to home when there is an invalid route (#3610)
  fix: chat sidebar layout overlapping content occasionally (#3590)
  fix: loading shared sessions (#3607)
  docs: use installer component for tutorial, add updating extensions section (#3608)
  fix: show token alert popover during agent responses and agent failure cases (#3536)
  reuse the cancellation token in the agent level (#3599)
  Docs: Move MongoDB tutorial to MCP section (#3602)
katzdave added a commit that referenced this pull request Jul 24, 2025
* 'main' of github.com:block/goose:
  Adds the `WaitingForUserInput` state (#3620)
  docs: update extensions library (#3612)
  Fixing grants path (#3632)
  docs: June 2024 Community All-Stars Spotlight (#3631)
  grant program (#3630)
  Lifei/sub recipe desktop temp (#3576)
  docs: local LLMs context size tip (#3454)
  fix: Handle non-default base path for OpenAI compatible model fetching (#3566)
  Goose security updates (#3579)
  fix: multi-tool calls in streamed openai-compatible responses (#3609)
  feat: subagent turn count, simple agent loop (#3597)
  feat: subagent independent extension manager (#3596)
  Improve session history loading resiliency (#3588)
  Added logging and changed default route case to not redirect to home when there is an invalid route (#3610)
  fix: chat sidebar layout overlapping content occasionally (#3590)
  fix: loading shared sessions (#3607)
atarantino pushed a commit to atarantino/goose that referenced this pull request Aug 5, 2025
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.

3 participants