Repository navigation
Conversation
JS-banana
force-pushed
the
fix/antigravity-const-schema-minimal
branch
from
November 2, 2026 04:09
d06dcfe to
ed55c89
Compare
…de Assist TypeBox serializes Type.Union([Type.Literal(...)]) tool parameters as anyOf branches carrying "const". Cloud Code Assist validates function declarations against OpenAPI 3.0, which has no "const", so every request from a session with such a tool 400s with "Unknown name \"const\" at ...parameters.properties[N].value.any_of[M]" (e.g. subagent_check.evidence since openpi-dev#652; setup's role/browser unions are affected too). enum-carrying parameters in the same payload pass, so rewrite const to a single-value enum in sanitizeSchemaForCca instead of dropping the constraint. Verified live: pi -ne -a -e ai-providers -e subagents against google-antigravity/gemini-3.8-flash-high 400s before, replies after the rewrite; broader load with workflows+setup passes as well. Unit tests cover anyOf-branch literals, enum merging, and a property named const.
JS-banana
force-pushed
the
fix/antigravity-const-schema-minimal
branch
from
November 3, 2026 09:23
ed55c89 to
dba602e
Compare
This branch has not been deployed
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.
Problem
Since #652 (first released in v0.10.0), Antigravity requests fail with HTTP 400 when a loaded tool uses a TypeBox literal union. The in-tree example is
subagent_check.evidence:anyOfbranches containconst, which Cloud Code Assist rejects:Setup role/browser literal unions expose the same failure. Related to #465 (the adjacent
$refproblem, which this PR does not resolve).Value
Restore the existing Antigravity tool path at the provider boundary, without rewriting each extension's schema or bypassing ordinary Pi tools.
Approach
constto a singletonenuminsidesanitizeSchemaForCca, shared by Gemini and Claude request routes.enumis an additional constraint: retain only the constant, rather than unioning in other choices. Reject conflicting const/enum constraints locally with a clear error instead of advertising impossible choices.0addb73963a924ee6daa5568151cd890b34e2999. Broader sanitization hardening remains in fix(ai-providers): harden CCA schema projection with safe literal handling #906.Validation
Current head:
dba602e9e5ab065699d0fdc3ae217b743bb83053. The 2026-11-03 CI refresh preserves exactly the source tree ofed55c898789168488cc59d7502960f483bae30b9; only commit metadata changed. The local results below were recorded on 2026-11-02 and are reused by identical tree identity, not presented as new local runs.node --test --experimental-strip-types tests/extensions/ai-providers/antigravity.test.ts: 63 passed. The corrected const/enum regression failed before the fix and passes afterward; includes contradictory constraints and structural object equality.bun run check: passed. Existing bundle-size warnings remain.bun run test: Node 2,455 tests, 2,445 passed / 8 skipped / 2 failed. Both failures are intests/extensions/code-mode/index.test.ts.0addb739, using the same locked dependencies, reproduces the same two failures at the same assertions (1 passed / 2 failed). The full suite is therefore not reported as green.bun run test ui: 108 files, 1,632 tests passed (run separately because the normal command stops after Node failures).-ne -a -e ./extensions/ai-providers/index.ts -e ./extensions/subagents/index.ts, ephemeral Session, built-in tools retained:google-antigravity/gemini-3.8-flash-highreturnedOK.without the schema 400. Installed npm OpenPI was not loaded into that run.git diff --check: passed.Historical before/after request evidence in the original report remains historical; the real request does not establish that every literal kind or provider model was live-tested.
Previous-head CI run 41386858096 passed all runtime jobs and Web E2E shards but had one Windows UI 5-second timeout. The integration cannot rerun upstream Actions, so the author refreshed the unchanged branch tip with an explicit expected-SHA lease to request a fresh run. Current-head CI run 41610705003 completed successfully on 2026-11-03: all 17 jobs passed, including Windows UI, runtime, both Web E2E shards, and aggregate gates. No test was skipped, weakened, or given retries to obtain this result.
Impact
$refsupport; broader wire projection is separately reviewed in fix(ai-providers): harden CCA schema projection with safe literal handling #906.