Fix antigravity provider integration — 404, stream processor, schema sanitization, model filtering#10
Open
alexsvdk wants to merge 1 commit into
Open
Fix antigravity provider integration — 404, stream processor, schema sanitization, model filtering#10alexsvdk wants to merge 1 commit into
alexsvdk wants to merge 1 commit into
Conversation
…chema sanitization, model filtering - Fix DEFAULT_BASE_URLS: add daily-cloudcode-pa.googleapis.com as primary endpoint - Fix sdkMode 'openai' → 'anthropic' to route through AntigravityStreamProcessor - Add StreamingStartedError to prevent endpoint-retry after streaming starts (avoids tool call duplication) - Expand GEMINI_UNSUPPORTED_FIELDS: add const, enumDescriptions, default, format, cache_control and 6 more - Fix fetchModels/getCachedModels: filter models by API quota response; fall back to all on empty - Fix setApiKey ordering: persist filtered model list before account-change event fires (both new and existing account paths) - Fix thinkingTagBuffer: flush remainder at stream end to avoid losing trailing response - Add totalTextEmitted counter: if stream ends with zero text but non-empty thinking, emit thinking as text (fixes GPT OSS 120B thought-only responses) - Remove auto-add-to-compatible on login - Update DEFAULT_USER_AGENT to antigravity/1.22.2 - Update model aliases: Gemini 3.1 naming, claude-opus-4-6-thinking, gpt-oss-120b-medium - Add claude-opus-4-6-thinking to antigravity.json; translate tooltip fields to English - Bump version 0.15.27 → 0.16.0
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.
Summary
Complete fix for the Antigravity (Google Cloud Code) provider. All issues discovered during live testing have been resolved.
Changes
Network / Routing
DEFAULT_BASE_URLS: Addeddaily-cloudcode-pa.googleapis.comas the primary endpoint — the old list only had sandbox and legacy URLs, causing 404 on all requestsDEFAULT_USER_AGENTtoantigravity/1.22.2Stream Processing
sdkMode: Changed from'openai'to'anthropic'so requests route toAntigravityStreamProcessorinstead ofOpenAIStreamProcessor(which couldn't parse the Gemini-format SSE stream — no output was produced)StreamingStartedError: Prevents endpoint-fallback retry after streaming has already started, which would replay tool calls and produce duplicates in the Copilot UIthinkingTagBufferflush: The tag lookahead buffer could hold up to 10 chars past end of stream; now flushed in thefinallyblock before final text flushtotalTextEmittedcounter + thought-only fallback: If the stream ends with zero text emitted but accumulated thinking content (e.g. GPT OSS 120B which returns 100%thought:trueparts), the thinking content is emitted as a text response instead of showing "Sorry, no response was returned"JSON Schema Sanitization
GEMINI_UNSUPPORTED_FIELDSin bothhandler.tsandrequestHelpers.ts: addedconst,enumDescriptions,enumCaseInsensitive,enumNormalizeWhitespace,default,deprecated,readOnly,writeOnly,format,cache_control,propertyNames— all sourced from anti-api's json-schema-cleaner; these cause HTTP 400 from the Gemini APIModel Filtering
fetchModels/getCachedModels: Models are now filtered to only those returned by the quota API endpoint — unavailable models are hidden. Falls back to full list if the API returns an empty responsetryFetchQuotaFromEndpoint: Tracks all models present in the response (not just those with explicitquotaInfo) — presence alone indicates availabilitysetApiKeyordering for both new-account and credential-refresh paths: API key (with filtered model list) is now persisted before the account-change event fires, soprovideLanguageModelChatInformationalready sees the correct model listaddAllAntigravityModelsToCompatiblecall on login — models are no longer auto-added to the Compatible ProviderConfig & Aliases
gemini-3.1-pro-*),claude-opus-4-6-thinking,gpt-oss-120b→gpt-oss-120b-medium, dot-notation Claude variantsclaude-opus-4-6-thinkingtoantigravity.jsonantigravity.jsonto EnglishbaseUrlinantigravity.jsontodaily-cloudcode-pa.googleapis.com/v1internalVersion
0.15.27→0.16.0