Files
Hundao 4a9b22719b fix(antigravity): unblock Gemini chats — schema sanitizer + UA bump (#7170)
* fix(antigravity): translate JSON Schema unions to Gemini nullable

Tool parameter schemas using JSON Schema 2020-12 unions like
"type": ["string", "null"] crash Gemini's function_declarations parser
with HTTP 400. Two existing tools trip this:

- core/framework/tasks/tools/colony_tools.py:52 (owner in _update_schema)
- core/framework/tasks/tools/session_tools.py:84-87 (same shape)

Add an adapter-level sanitizer that walks the schema tree and converts
union-with-null to OpenAPI 3.0 "nullable": true (which Gemini accepts).
Recurses into properties, items, additionalProperties, and the
anyOf/oneOf/allOf combinators. Source schemas remain valid JSON Schema
so OpenAI/Anthropic backends are unaffected.

* fix(antigravity): bump spoofed UA past Google's deprecation cutoff

Google has deprecated client version "Antigravity/1.18.3" — chats now
return "This version of Antigravity is no longer supported" instead of
a real model response.

Bump the spoofed User-Agent to "Antigravity/1.23.2" + "Electron/39.2.3"
(current desktop release) and add a comment that this needs periodic
re-bumping. A more durable fix (auto-detect from the installed app's
Info.plist) is a follow-up.

* fix(antigravity): fail loud on multi-type non-null Gemini schema unions

Per review on PR #7170: silently picking the first type from a union
like ["string", "integer", "null"] changes the contract for callers
that rely on the other types, and the failure is hard to diagnose at
the Gemini side. Replace the silent narrowing with a ValueError that
points the schema author at anyOf or a single type.

A repo scan finds no current Gemini-bound schemas using multi-type
non-null unions, so this branch is preventative for future authors.

* chore(antigravity): drop em dash from test docstring
2026-05-05 01:16:48 +08:00
..
2026-01-19 18:42:16 -08:00
2026-05-01 18:06:39 -07:00
2026-04-23 15:34:07 -07:00
2026-04-24 10:12:06 -07:00
2026-04-09 22:04:23 -07:00
2026-04-09 22:04:23 -07:00
2026-03-10 15:00:14 -07:00
2026-04-24 20:17:41 -07:00
2026-04-18 21:45:34 -07:00
2026-04-28 10:43:54 -07:00
2026-01-28 13:03:51 +05:30
2026-04-09 22:04:23 -07:00
2026-04-29 19:16:00 -07:00
2026-04-14 18:51:14 -07:00
2026-04-22 21:33:33 -07:00
2026-04-14 18:51:14 -07:00
2026-04-23 15:34:07 -07:00
2026-04-20 19:14:14 -07:00