Skip to content

fix: use scalar type in tool schema for google-antigravity compatibility#1

Open
Whamp wants to merge 1 commit intojo-inc:mainfrom
Whamp:fix/nullable-type-schema
Open

fix: use scalar type in tool schema for google-antigravity compatibility#1
Whamp wants to merge 1 commit intojo-inc:mainfrom
Whamp:fix/nullable-type-schema

Conversation

@Whamp
Copy link
Copy Markdown

@Whamp Whamp commented Feb 23, 2026

Me:
Sorry i was working on a bug my agent found when using your extension with google-antigravity provider. It got a little trigger happy and fired off this PR. It's pretty simple but feel free to close and ignore if you're not looking for contributions.

Agent PR:
The submit_analysis tool schema uses type: ["string", "null"] for old_text and after_text. This is valid JSON Schema but breaks on the google-antigravity provider.

When pi routes Claude models through Cloud Code Assist, it passes tool schemas via the protobuf-backed parameters field rather than parametersJsonSchema. Protobuf requires type to be a scalar string — an array triggers:

Proto field is not repeating, cannot start list.

Both fields are already absent from required: ["type", "new_text"], so nullability is expressed by omission. The model omits the field instead of passing null.

Reproducer: run /reflect with any google-antigravity Claude model (e.g. claude-opus-4-6-thinking).

The submit_analysis tool schema used type: ["string", "null"] for old_text
and after_text fields. This is valid JSON Schema but the Cloud Code Assist
API (used by google-antigravity provider) validates tool parameters via
protobuf, which requires type to be a scalar string, not an array.

Both fields are already optional (not in required), so nullability is
expressed by omission. The model can simply leave them out instead of
passing null.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant