From 6dcbbf64c33b5bebbd7c9f52c3b558e586a718ab Mon Sep 17 00:00:00 2001 From: hkfires <10558748+hkfires@users.noreply.github.com> Date: Wed, 21 Jan 2026 10:10:40 +0800 Subject: [PATCH] fix(executor): only strip maxOutputTokens for non-claude models --- internal/runtime/executor/antigravity_executor.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/runtime/executor/antigravity_executor.go b/internal/runtime/executor/antigravity_executor.go index 100afd1c..897004fb 100644 --- a/internal/runtime/executor/antigravity_executor.go +++ b/internal/runtime/executor/antigravity_executor.go @@ -1405,7 +1405,7 @@ func geminiToAntigravity(modelName string, payload []byte, projectID string) []b template, _ = sjson.Set(template, "request.sessionId", generateStableSessionID(payload)) template, _ = sjson.Delete(template, "request.safetySettings") -// template, _ = sjson.Set(template, "request.toolConfig.functionCallingConfig.mode", "VALIDATED") + // template, _ = sjson.Set(template, "request.toolConfig.functionCallingConfig.mode", "VALIDATED") if strings.Contains(modelName, "claude") || strings.Contains(modelName, "gemini-3-pro-high") { gjson.Get(template, "request.tools").ForEach(func(key, tool gjson.Result) bool { @@ -1419,7 +1419,9 @@ func geminiToAntigravity(modelName string, payload []byte, projectID string) []b }) return true }) - } else { + } + + if !strings.Contains(modelName, "claude") { template, _ = sjson.Delete(template, "request.generationConfig.maxOutputTokens") }