fix: use scalar type in tool schema for google-antigravity compatibility#1
Open
Whamp wants to merge 1 commit intojo-inc:mainfrom
Open
fix: use scalar type in tool schema for google-antigravity compatibility#1Whamp wants to merge 1 commit intojo-inc:mainfrom
Whamp wants to merge 1 commit intojo-inc:mainfrom
Conversation
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.
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.
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_analysistool schema usestype: ["string", "null"]forold_textandafter_text. This is valid JSON Schema but breaks on thegoogle-antigravityprovider.When pi routes Claude models through Cloud Code Assist, it passes tool schemas via the protobuf-backed
parametersfield rather thanparametersJsonSchema. Protobuf requirestypeto be a scalar string — an array triggers:Both fields are already absent from
required: ["type", "new_text"], so nullability is expressed by omission. The model omits the field instead of passingnull.Reproducer: run
/reflectwith anygoogle-antigravityClaude model (e.g.claude-opus-4-6-thinking).