mirror of
https://github.com/router-for-me/CLIProxyAPIPlus.git
synced 2026-05-06 20:40:21 +08:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user