[BUG] HTTP 400 Bad Request - enum only allowed for STRING type (tools[43] & tools[46]) - Trajectory ID: 41578eb2-41f2-4e20-b6d8-

Hello,

I am experiencing a persistent HTTP 400 error in Antigravity. I would appreciate a response in Spanish or English.

Trajectory ID: 41578eb2-41f2-4e20-b6d8-…
Error: HTTP 400 Bad Request

Sherlog TraceID: 0x8e77a2b300…

Headers:

{"Alt-Svc":["h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000"],"Content-Length":["1670"],"Content-Type":["text/event-stream"],"Date":["Mon, 02 Mar 2026 18:50:54 GMT"],"Server":["ESF"],"Server-Timing":["gfet4t7; dur=749"],"Vary":["Origin","X-Origin","Referer"],"X-Cloudaicompanion-Trace-Id":["8e77a2b30051c314"],"X-Content-Type-Options":["nosniff"],"X-Frame-Options":["SAMEORIGIN"],"X-Xss-Protection":["0"]}

Error Body:

{
  "error": {
    "code": 400,
    "message": "* GenerateContentRequest.tools[43].function_declarations[0].parameters.properties[tasks].items.properties[priority].enum: only allowed for STRING type\n* GenerateContentRequest.tools[43].function_declarations[0].parameters.properties[tasks].items.properties[priority].enum[0]: cannot be empty\n* GenerateContentRequest.tools[43].function_declarations[0].parameters.properties[tasks].items.properties[priority].enum[1]: cannot be empty\n* GenerateContentRequest.tools[43].function_declarations[0].parameters.properties[tasks].items.properties[priority].enum[2]: cannot be empty\n* GenerateContentRequest.tools[43].function_declarations[0].parameters.properties[tasks].items.properties[priority].enum[3]: cannot be empty\n* GenerateContentRequest.tools[43].function_declarations[0].parameters.properties[tasks].items.properties[priority].enum[4]: cannot be empty\n* GenerateContentRequest.tools[46].function_declarations[0].parameters.properties[priority].enum: only allowed for STRING type\n* GenerateContentRequest.tools[46].function_declarations[0].parameters.properties[priority].enum[0]: cannot be empty\n* GenerateContentRequest.tools[46].function_declarations[0].parameters.properties[priority].enum[1]: cannot be empty\n* GenerateContentRequest.tools[46].function_declarations[0].parameters.properties[priority].enum[2]: cannot be empty\n* GenerateContentRequest.tools[46].function_declarations[0].parameters.properties[priority].enum[3]: cannot be empty\n* GenerateContentRequest.tools[46].function_declarations[0].parameters.properties[priority].enum[4]: cannot be empty\n",
    "status": "INVALID_ARGUMENT"
  }
}

The agent stops working completely whenever this error occurs. It seems like tools[43] and tools[46] have a priority field with an enum defined on a non-STRING type, which the Gemini API rejects.

Is there a fix or workaround available? Has this been reported before?

Thank you.

Hi @Gianfranco_Policari ,

Thanks for flagging this. To let us understand : Which model are you using in Antigravity? If you are using Gemini 3.1 Pro, the API now strictly requires an explicit “type” : “string” for all enums.

The error in Tools 43 and 46 indicates the priority field is missing this declaration. Please update your schema:

  • Change: "priority": { "enum": [...] }

  • To: "priority": { "type": "string", "enum": [...] }

Please let us know if the issue persists and any additional logs.

1 Like