fix(agents): remove unsupported JSON Schema keywords for Cloud Code Assist API#567
Merged
steipete merged 10 commits intoJan 9, 2026
Merged
Conversation
Contributor
Author
|
@steipete I will be out for around 24 hours as I'm taking a flight back home. It would be nice if you can merge it asap or take care of it! |
steipete
added a commit
that referenced
this pull request
Jan 9, 2026
steipete
force-pushed
the
fix/gemini-schema-sanitization
branch
from
January 9, 2026 13:08
b047107 to
6f3474a
Compare
steipete
force-pushed
the
fix/gemini-schema-sanitization
branch
from
January 9, 2026 13:25
9961d9e to
caf69f1
Compare
…ssist API Cloud Code Assist API requires strict JSON Schema draft 2020-12 compliance and rejects keywords like patternProperties, additionalProperties, $schema, $id, $ref, $defs, and definitions. This extends cleanSchemaForGemini to: - Remove all unsupported keywords from tool schemas - Add oneOf literal flattening (matching existing anyOf behavior) - Add test to verify no unsupported keywords remain in tool schemas
steipete
force-pushed
the
fix/gemini-schema-sanitization
branch
from
January 9, 2026 14:23
402c7f3 to
c228df8
Compare
Contributor
|
Landed via temp rebase onto main (merged w/ admin override; CI still running). Thanks @erikpr1994! |
dominicnunez
referenced
this pull request
in dominicnunez/openclaw
Feb 26, 2026
dustin-olenslager
pushed a commit
to dustin-olenslager/ironclaw-supreme
that referenced
this pull request
Mar 24, 2026
lovewanwan
pushed a commit
to lovewanwan/openclaw
that referenced
this pull request
Apr 28, 2026
lovewanwan
pushed a commit
to lovewanwan/openclaw
that referenced
this pull request
Apr 28, 2026
lovewanwan
pushed a commit
to lovewanwan/openclaw
that referenced
this pull request
Apr 28, 2026
lovewanwan
pushed a commit
to lovewanwan/openclaw
that referenced
this pull request
Apr 28, 2026
lovewanwan
pushed a commit
to lovewanwan/openclaw
that referenced
this pull request
Apr 28, 2026
lovewanwan
pushed a commit
to lovewanwan/openclaw
that referenced
this pull request
Apr 28, 2026
lovewanwan
pushed a commit
to lovewanwan/openclaw
that referenced
this pull request
Apr 28, 2026
lovewanwan
pushed a commit
to lovewanwan/openclaw
that referenced
this pull request
Apr 28, 2026
lovewanwan
pushed a commit
to lovewanwan/openclaw
that referenced
this pull request
Apr 28, 2026
lovewanwan
pushed a commit
to lovewanwan/openclaw
that referenced
this pull request
Apr 28, 2026
…itization fix(agents): remove unsupported JSON Schema keywords for Cloud Code Assist API
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
May 9, 2026
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
May 9, 2026
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
May 9, 2026
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
May 9, 2026
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
May 9, 2026
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
May 9, 2026
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
May 9, 2026
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
May 9, 2026
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
May 9, 2026
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
May 9, 2026
…itization fix(agents): remove unsupported JSON Schema keywords for Cloud Code Assist API
jameslcowan
pushed a commit
to jameslcowan/openclaw
that referenced
this pull request
Jun 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Problem
When switching from Claude to Gemini mid-session (e.g., when running out of tokens), Claude's tool schemas contain JSON Schema keywords that Google's Cloud Code Assist API rejects as non-compliant with JSON Schema draft 2020-12.
Solution
Extended
cleanSchemaForGemini()insrc/agents/pi-tools.tsto:UNSUPPORTED_SCHEMA_KEYWORDSblocklistoneOfliterals to enum (matching existinganyOfbehavior)additionalPropertiesentirely instead of just recursively cleaning itTest Plan
Changes