fix: OpenAI Responses API parallel tool calls losing call_ids #9659
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.
Fixes #8773
When GPT-5 makes parallel tool calls via the Responses API, each
function_callhas a uniquecall_id(fc_*). These IDs were being overwritten instead of accumulated, causing:Changes
gui/src/redux/slices/sessionSlice.ts: Accumulate IDs inresponsesOutputItemIds[]array during streamingcore/llm/openaiTypeConverters.ts: Emitfunction_callfor each tool call with positional ID matchingcore/llm/openaiTypeConverters.test.ts: Added comprehensive tests for parallel tool call scenariosHow it works
fromResponsesChunksetsmessage.metadata.responsesOutputItemId, we now accumulate these into an arrayresponsesOutputItemIds[]call_idwhen sent back to OpenAITest plan
Related: #8935
Continue Tasks
Powered by Continue
Summary by cubic
Fixes lost call_id mapping for parallel tool calls in the OpenAI Responses API, preventing “No tool call found for function call output” errors and restoring correct pairing between function_call and tool outputs.
Written for commit 4ad4a6e. Summary will update on new commits.