← Back to PRs

#4445: fix: resolve Antigravity "unsupported version" and tool_use schema validation errors

by harry2690 open 2026-01-30 07:00 View on GitHub →
agents
Problem: The hardcoded version 1.11.x caused "version no longer supported" errors on the 2026-01-29 gateway update. The 1.15.8 API now strictly enforces the presence of the input field in tool_use payloads, leading to Field required crashes. Solution: Updated version strings to antigravity/1.15.8 across the Google Provider. Refactored tool-use logic to ensure a mandatory input object (even if empty) is always included in the payload. Verified on M2 Mac with Node v25.5.0. Verification: openclaw doctor confirmed as valid. Tested complex tool calls without schema errors. <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR updates Antigravity integration to avoid recent gateway failures by: - Bumping the hardcoded Antigravity `User-Agent` version (including via a pnpm patch to `@mariozechner/pi-ai`). - Adding a transcript sanitizer (`sanitizeToolUseInput`) and updating Google session history sanitization/tests so tool-related blocks always include a required `input` object. These changes sit in the Pi embedded runner’s transcript hygiene path (`src/agents/pi-embedded-runner/google.ts`), ensuring messages are shaped to match the stricter 1.15.8 schema before being sent to Google/Antigravity. <h3>Confidence Score: 3/5</h3> - This PR is close to safe to merge, but there is a high-impact edge case where tool-result messages may still violate the stricter tool_use schema. - Most changes are straightforward (UA bump + sanitizer + tests). However, the new sanitizer filters on `msg.role` and will not touch `toolResult` messages, even though transcript tool blocks can appear there; if the upstream schema enforcement applies to those blocks too, the original crash may persist in some sessions. Also, adding a pnpm patched dependency increases the surface area slightly and warrants a quick verification run in CI. - src/agents/pi-embedded-helpers/google.ts; verify_logic.mjs; package.json/pnpm-lock.yaml (patched dependency wiring) <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> **Context used:** - Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8)) - Context from `dashboard` - AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=0d0c8278-ef8e-4d6c-ab21-f5527e322f13)) <!-- /greptile_comment -->

Most Similar PRs