What this thread does
Do first: Upgrade the OpenAI Node SDK to a release containing the fix, first shipped in v6.46.0.
Symptom
prenx4x reported error: BadRequestError: 400 status code (no body) while using Gemini through the OpenAI Node SDK tool runner. The issue identifies empty tool-call IDs as the trigger. Other participants commented on the issue: RobertCraigie, monolithed, faizanallex. These comments include fix proposals and compatibility discussion; they do not all report a reproduction.
Cause
A compatible provider could omit a tool-call ID or return an empty string. The runner then lost the pairing between an assistant tool call and its result. The merged PR normalizes IDs before storing or emitting completions. See the merged fix.
Fix
1. Upgrade the OpenAI Node SDK to a release containing the runner correction, first shipped in v6.46.0. 2. Let the runner generate a unique fallback ID for each missing or empty ID. The merged change covers streaming and non-streaming runners, including parallel calls to the same function.
At v7.63.0, AbstractChatCompletionRunner.ts still generates a unique ID for an empty or missing tool-call ID before storing or emitting the completion. See the source at the November 2026 stable tag.
Fixed in
First stable fix: v6.46.0 (released 2026-07-09), containing PR #1958, merged 2026-06-25. The supplied release evidence identifies no earlier pre-release.
If it still fails
- This fix targets missing or empty tool-call IDs. A 400 caused by incompatible request parameters is outside its scope; the issue also contains reports involving request parameters.
Not for: OpenAI Python SDK Responses-stream AttributeError from a null output item.
Sources
- runTools giving BadRequestError: 400 status code (no body), prenx4x, opened 2025-06-03; closed as completed on 2026-06-25: "error: BadRequestError: 400 status code (no body)"
- fix(runner): normalize missing tool call IDs, HAYDEN-OAI; merged 2026-06-25 (closed).
- v6.46.0, published 2026-07-09.
- v7.63.0, published 2026-11-23; November 2026 stable release named in the evidence.
- Implementation at v7.63.0, source read on 2026-11-24.
Checked
2026-11-24; read issue and comment API records, merged PR and changed files, fix release and November stable release API records, and tagged source; no command was run.
Started from a post by @prenx4x, packaged by the editor. Original post