Merge pull request #2252 from sususu98/fix/antigravity-empty-thought-text
fix(antigravity): always include text field in thought parts to prevent Google 500
This commit is contained in:
@@ -148,11 +148,11 @@ func ConvertClaudeRequestToAntigravity(modelName string, inputRawJSON []byte, _
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Valid signature, send as thought block
|
// Valid signature, send as thought block
|
||||||
|
// Always include "text" field — Google Antigravity API requires it
|
||||||
|
// even for redacted thinking where the text is empty.
|
||||||
partJSON := []byte(`{}`)
|
partJSON := []byte(`{}`)
|
||||||
partJSON, _ = sjson.SetBytes(partJSON, "thought", true)
|
partJSON, _ = sjson.SetBytes(partJSON, "thought", true)
|
||||||
if thinkingText != "" {
|
|
||||||
partJSON, _ = sjson.SetBytes(partJSON, "text", thinkingText)
|
partJSON, _ = sjson.SetBytes(partJSON, "text", thinkingText)
|
||||||
}
|
|
||||||
if signature != "" {
|
if signature != "" {
|
||||||
partJSON, _ = sjson.SetBytes(partJSON, "thoughtSignature", signature)
|
partJSON, _ = sjson.SetBytes(partJSON, "thoughtSignature", signature)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user