mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-21 11:25:03 +00:00
Gemini/Antigravity delivers tool arguments as one complete object, so this converter synthesizes the Responses tool-call stream itself and therefore owns its self-consistency. The done event was built without Arguments, leaving it "" while the preceding delta carried the entire JSON. Clients that reconcile the done payload against the accumulated deltas (OpenAI Responses SDK); Qoder's reconcileToolCall) reject that mismatch as inconsistent_tool_call and abort the turn non-retryably, so every tool call through the gateway failed. Emit state.CurrentArgs, which closeCurrentResponsesItem already uses for the item, restoring sum(deltas) == done.arguments == item.arguments. Regression test asserts the delta sum equals the done payload and fails closed when Arguments is dropped.