fix(antigravity): drop requestType "agent" to avoid false 429 RESOURCE_EXHAUSTED
This commit is contained in:
@@ -279,10 +279,11 @@ function wrapInCloudCodeEnvelope(model, geminiCLI, credentials = null, isAntigra
|
||||
}
|
||||
};
|
||||
|
||||
// Antigravity specific fields
|
||||
if (isAntigravity) {
|
||||
envelope.requestType = "agent";
|
||||
} else {
|
||||
// Antigravity specific fields.
|
||||
// NOTE: the official Antigravity client omits `requestType` entirely on the
|
||||
// agent (chat) path. Sending `requestType: "agent"` triggers a detail-free
|
||||
// 429 RESOURCE_EXHAUSTED even with quota available.
|
||||
if (!isAntigravity) {
|
||||
// Keep safetySettings for Gemini CLI
|
||||
envelope.request.safetySettings = geminiCLI.safetySettings;
|
||||
}
|
||||
@@ -305,7 +306,8 @@ function wrapInCloudCodeEnvelopeForClaude(model, claudeRequest, credentials = nu
|
||||
model: model,
|
||||
userAgent: "antigravity",
|
||||
requestId: `agent-${generateUUID()}`,
|
||||
requestType: "agent",
|
||||
// NOTE: official Antigravity client omits `requestType` on the agent (chat)
|
||||
// path — see the note in wrapInCloudCodeEnvelope() above.
|
||||
request: {
|
||||
sessionId: toNumericSessionId(credentials?._clientSessionId) || deriveSessionId(credentials?.email || credentials?.connectionId),
|
||||
contents: [],
|
||||
|
||||
Reference in New Issue
Block a user