hkfires commited on
Commit ·
a18a371
1
Parent(s): 4e313ee
fix(executor): only strip maxOutputTokens for non-claude models
Browse files
internal/runtime/executor/antigravity_executor.go
CHANGED
|
@@ -1405,7 +1405,7 @@ func geminiToAntigravity(modelName string, payload []byte, projectID string) []b
|
|
| 1405 |
template, _ = sjson.Set(template, "request.sessionId", generateStableSessionID(payload))
|
| 1406 |
|
| 1407 |
template, _ = sjson.Delete(template, "request.safetySettings")
|
| 1408 |
-
// template, _ = sjson.Set(template, "request.toolConfig.functionCallingConfig.mode", "VALIDATED")
|
| 1409 |
|
| 1410 |
if strings.Contains(modelName, "claude") || strings.Contains(modelName, "gemini-3-pro-high") {
|
| 1411 |
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
|
|
| 1419 |
})
|
| 1420 |
return true
|
| 1421 |
})
|
| 1422 |
-
}
|
|
|
|
|
|
|
| 1423 |
template, _ = sjson.Delete(template, "request.generationConfig.maxOutputTokens")
|
| 1424 |
}
|
| 1425 |
|
|
|
|
| 1405 |
template, _ = sjson.Set(template, "request.sessionId", generateStableSessionID(payload))
|
| 1406 |
|
| 1407 |
template, _ = sjson.Delete(template, "request.safetySettings")
|
| 1408 |
+
// template, _ = sjson.Set(template, "request.toolConfig.functionCallingConfig.mode", "VALIDATED")
|
| 1409 |
|
| 1410 |
if strings.Contains(modelName, "claude") || strings.Contains(modelName, "gemini-3-pro-high") {
|
| 1411 |
gjson.Get(template, "request.tools").ForEach(func(key, tool gjson.Result) bool {
|
|
|
|
| 1419 |
})
|
| 1420 |
return true
|
| 1421 |
})
|
| 1422 |
+
}
|
| 1423 |
+
|
| 1424 |
+
if !strings.Contains(modelName, "claude") {
|
| 1425 |
template, _ = sjson.Delete(template, "request.generationConfig.maxOutputTokens")
|
| 1426 |
}
|
| 1427 |
|