continue-custom/packages
Dallin Romney 02525d119b
fix(openai): fix Responses API 400 errors for reasoning, tool calls, and ID handling (#11785)
* fix(openai): fix Responses API 400 errors for reasoning, tool calls, and ID handling

Three categories of OpenAI Responses API 400 errors are addressed:

1. "No tool call found for function call output with call_id" — function_call
   items are now always emitted when tool calls exist (even without fc_ IDs),
   and orphaned function_call_output items are removed in post-processing.

2. "Item provided without its required 'reasoning' item" — reasoning items
   without encrypted_content (e.g. from saved sessions) are removed, and the
   id is stripped from subsequent function_call items so the API doesn't
   reject them for referencing a missing reasoning item. Trailing reasoning
   items not followed by a valid successor are also removed.

3. "Expected an ID that begins with 'fc'" — responsesOutputItemIds (which
   accumulates both msg_ and fc_ IDs during streaming) is now filtered to
   only fc_-prefixed IDs for function_call items, preventing msg_ IDs from
   being used where fc_ IDs are required.

Co-authored-by: Luna <20552038+xxsLuna@users.noreply.github.com>
Co-authored-by: Robert Benko <10097827+Quazistax@users.noreply.github.com>
Co-authored-by: pallaprolus <162944051+pallaprolus@users.noreply.github.com>

* fix(openai-adapters): don't duplicate tool call args in Vercel stream converter

The tool-call event was re-emitting the full arguments that were already
streamed via tool-input-start/delta, causing JSON.parse failures in
consumers. Now tool-call only emits extra_content when a Gemini
thoughtSignature is present, and returns null otherwise.

---------

Co-authored-by: Luna <20552038+xxsLuna@users.noreply.github.com>
Co-authored-by: Robert Benko <10097827+Quazistax@users.noreply.github.com>
Co-authored-by: pallaprolus <162944051+pallaprolus@users.noreply.github.com>
2026-03-24 18:55:06 -07:00
..
config-types feat: add MiniMax as a new LLM provider with M2.7 default (#11367) 2026-03-24 13:06:19 -07:00
config-yaml Remove Gemini 2.0 Flash from defaults and update Claude defaults to 4.6 (#11782) 2026-03-24 17:03:52 -07:00
continue-sdk [Snyk] Security upgrade @openapitools/openapi-generator-cli from 2.30.0 to 2.31.0 (#11764) 2026-03-24 10:57:28 -07:00
fetch chore(deps-dev): bump rollup from 4.41.1 to 4.59.0 in /packages/fetch (#10841) 2026-03-10 00:10:20 -07:00
hub chore(deps): bump minimatch in /packages/hub (#10955) 2026-03-09 11:57:55 -07:00
llm-info feat: add MiniMax as a new LLM provider with M2.7 default (#11367) 2026-03-24 13:06:19 -07:00
openai-adapters fix(openai): fix Responses API 400 errors for reasoning, tool calls, and ID handling (#11785) 2026-03-24 18:55:06 -07:00
terminal-security style: run prettier on terminal security code 2025-10-30 00:56:55 +00:00
shared-release.config.js fix prettier 2025-07-18 19:20:13 +02:00