#Cloud Code API error: Invalid JSON

1 messages · Page 1 of 1 (latest)

dapper merlin
#

I can't get this to work, I keep getting an error
Cloud Code Assist API error (400): Invalid JSON payload received. Unknown name "patternProperties" at 'request.tools[0].function_declarations[3].parameters.properties[2].value': Cannot find field.

oak mountainBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> âś… Mark Solution

obtuse wedgeBOT
#

That specific 400 is almost always Cloud Code Assist (Gemini) tool-schema incompatibility: the endpoint only accepts a subset of JSON Schema, and it rejects keywords like patternProperties (exactly what your error says).

Fix

  1. Check your OpenClaw version (this was fixed by adding a “Gemini schema cleaner” in newer builds):
  • Run: openclaw --version
  • If you’re older than 2026.1.9, update OpenClaw and restart the gateway, then retry.
  1. If you can’t update right now, work around it by:
  • Switching to a non–Cloud Code Assist model/provider for tool use (Cloud Code is the picky one), or
  • Simplifying/removing custom tools that generate patternProperties (common culprit: “dictionary/map” types). Stick to:
    • type: "object", properties, required, simple enum
    • avoid anyOf/oneOf/allOf, patternProperties, additionalProperties, minLength/maxLength, format, etc.

Quick questions so I can point you to the exact next step

  • What does openclaw --version show?
  • Are you using a google-antigravity/... model (Cloud Code Assist), and did you add any custom tools?