fix(executor): remove safetySettings from payload in token counting request

This commit is contained in:
Luis Pater
2025-11-03 17:31:43 +08:00
parent 16b0a561d7
commit 64774a5786

View File

@@ -196,6 +196,7 @@ func (e *AIStudioExecutor) CountTokens(ctx context.Context, auth *cliproxyauth.A
body.payload, _ = sjson.DeleteBytes(body.payload, "generationConfig")
body.payload, _ = sjson.DeleteBytes(body.payload, "tools")
body.payload, _ = sjson.DeleteBytes(body.payload, "safetySettings")
endpoint := e.buildEndpoint(req.Model, "countTokens", "")
wsReq := &wsrelay.HTTPRequest{