Merge pull request #2817 from sususu98/fix/antigravity-strip-billing-header

fix(antigravity): strip billing header from system instruction before upstream call
This commit is contained in:
Luis Pater
2026-04-16 02:46:05 +08:00
committed by GitHub

View File

@@ -101,6 +101,9 @@ func ConvertClaudeRequestToAntigravity(modelName string, inputRawJSON []byte, _
systemTypePromptResult := systemPromptResult.Get("type")
if systemTypePromptResult.Type == gjson.String && systemTypePromptResult.String() == "text" {
systemPrompt := systemPromptResult.Get("text").String()
if strings.HasPrefix(systemPrompt, "x-anthropic-billing-header:") {
continue
}
partJSON := []byte(`{}`)
if systemPrompt != "" {
partJSON, _ = sjson.SetBytes(partJSON, "text", systemPrompt)