fix(antigravity): strip stream_options from non-stream requests

OpenAI clients may send stream_options with stream=false; Google
generateContent rejects that combination. Drop it when not streaming.
This commit is contained in:
Nurwanda Romadhon
2026-07-29 19:30:44 +07:00
parent 5e59790824
commit 0afe949387
2 changed files with 49 additions and 0 deletions
+4
View File
@@ -136,6 +136,10 @@ export class AntigravityExecutor extends BaseExecutor {
transformRequest(model, body, stream, credentials) {
const projectId = credentials?.projectId || this.generateProjectId();
// OpenAI clients may include stream_options even for non-streaming calls.
// Google generateContent rejects that combination before processing the request.
if (stream !== true) delete body.stream_options;
// ─── Image generation: completely different request structure ───
if (isImageModel(model)) {
const imageConfig = parseImageConfig(model);