fix(executor): stop rewriting thinkingLevel for gemini

Remove automatic thinkingLevel -> thinkingBudget:-1 conversion
for non-gemini-3 models in antigravity executor.

Cherry-picked from 1d2fe553.
This commit is contained in:
RCD
2026-01-20 10:40:07 +07:00
parent f1d05cc027
commit 5a38b6bc04
@@ -1968,13 +1968,6 @@ func geminiToAntigravity(modelName string, payload []byte, projectID string, str
template, _ = sjson.Delete(template, "request.safetySettings")
template, _ = sjson.Set(template, "request.toolConfig.functionCallingConfig.mode", "VALIDATED")
if !strings.HasPrefix(modelName, "gemini-3-") {
if thinkingLevel := gjson.Get(template, "request.generationConfig.thinkingConfig.thinkingLevel"); thinkingLevel.Exists() {
template, _ = sjson.Delete(template, "request.generationConfig.thinkingConfig.thinkingLevel")
template, _ = sjson.Set(template, "request.generationConfig.thinkingConfig.thinkingBudget", -1)
}
}
if strings.Contains(modelName, "claude") {
gjson.Get(template, "request.tools").ForEach(func(key, tool gjson.Result) bool {
tool.Get("functionDeclarations").ForEach(func(funKey, funcDecl gjson.Result) bool {