Skip to content

fix(gui): correlate id-less tool-call fragments by provider index - #13224

Open
canblmz1 wants to merge 1 commit into
continuedev:mainfrom
canblmz1:fix/openai-parallel-tool-call-index
Open

fix(gui): correlate id-less tool-call fragments by provider index#13224
canblmz1 wants to merge 1 commit into
continuedev:mainfrom
canblmz1:fix/openai-parallel-tool-call-index

Conversation

@canblmz1

@canblmz1 canblmz1 commented Sep 4, 2026

Copy link
Copy Markdown

Description

applyToolCallDelta currently falls back to the most recently tracked tool call when a streamed continuation fragment does not contain an id.

The OpenAI SDK's streamed tool-call type requires an index while id is optional. Because Continue currently drops that index in fromChatCompletionChunk, interleaved parallel tool-call fragments can be applied to the wrong call.

This preserves tool_call.index through ToolCallDelta and ToolCallState and uses it to correlate id-less continuation fragments. Existing id-based correlation remains authoritative, and the legacy fallback remains unchanged for fragments that provide neither identity field.

Fixes #13223

Tests

Added an integration-style regression covering two interleaved parallel OpenAI tool calls and verified that each call retains only its own argument fragments.

Also re-ran the relevant existing GUI and core tool-call suites.

Checklist

  • I've read the contributing guide
  • The relevant docs, if any, have been updated or created
  • The relevant tests, if any, have been updated or created

@canblmz1
canblmz1 requested a review from a team as a code owner September 4, 2026 16:31
@canblmz1
canblmz1 requested review from sestinj and removed request for a team September 4, 2026 16:31
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@canblmz1
canblmz1 force-pushed the fix/openai-parallel-tool-call-index branch from 56bf5ee to c5d2516 Compare September 4, 2026 16:38
@canblmz1

canblmz1 commented Sep 4, 2026

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

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.

OpenAI parallel tool-call argument fragments can be applied to the wrong call

1 participant