mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #4011] [MERGED] Fix empty tool-call parameters with GPT-5.6 on the Responses API #6200
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#6200
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/4011
Author: @SpicyMarinara
Created: 7/23/2026
Status: ✅ Merged
Merged: 7/23/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/4010-gpt56-websearch-tools📝 Commits (2)
44bb617Accumulate Responses-API tool-call arguments by item idd4c8fa7Merge branch 'staging' into fix/4010-gpt56-websearch-tools📊 Changes
3 files changed (+87 additions, -14 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
packages/server/src/services/llm/providers/openai.provider.ts(+18 -14)📝
scripts/regressions/provider-compat.regression.ts(+68 -0)📄 Description
Linked issue
Fixes #4010
Why this change
Web Search (and any tool) fails with GPT-5.6 (Sol) in Roleplay mode: the model reports the tool-call JSON parameters are empty/blank/malformed, then loops indefinitely without answering. Reproduced by reasoning through the Responses-API streaming path.
Root cause: GPT-5.6/5.5/5.4 and Codex models use the OpenAI Responses API, which streams function-call arguments in
response.function_call_arguments.delta/.doneevents that reference the output item byitem_id(thefc_…item id) — notcall_id. The streaming parser accumulated arguments in a map keyed bycall_id(thecall_…id) and readparsed.call_idfrom the delta events, a field those events don't carry. So theif (callId && delta)guard was always false, arguments never accumulated, and the tool call surfaced with empty arguments. This affected both OpenAI and OpenRouter because gpt-5.6 routes through the Responses API by model name (streaming only — Roleplay streams).What changed
item.id), and read thedelta/doneevents byitem_id(withcall_idas a fallback for robustness).call_idas the surfaced tool-callid, so the follow-upfunction_call_outputstill references the call correctly.provider-compatnow streams a Responses-API function call (output_item.added→ twofunction_call_arguments.delta→.done→output_item.done) and asserts the query is reassembled ({"query":"latest marinara news"}) and thecall_idis preserved. Pre-fix this asserts empty arguments and fails.Validation
pnpm checkpasses locallyCONTRIBUTING.mdAutomated:
pnpm checkandpnpm regression:providers(with the new Responses-API function-call test) pass.Manual verification notes
Docs and release impact
UI evidence
No UI changes — tool-call streaming fix.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.