Skip to content

Feat/antigravity models#34

Merged
mydisha merged 3 commits into
mydisha:mainfrom
bobbyunknown:feat/antigravity-models
Jul 4, 2026
Merged

Feat/antigravity models#34
mydisha merged 3 commits into
mydisha:mainfrom
bobbyunknown:feat/antigravity-models

Conversation

@bobbyunknown

Copy link
Copy Markdown
Contributor

What

Add Antigravity provider support with model alias mapping, upstream fallback chains, and full model catalog.

Why

Antigravity Cloud Code API uses different upstream model IDs than the public-facing names. Models like gemini-3.5-flash-high resolve to gemini-3-flash-agent
upstream. Additionally, some Pro-family models silently rename their upstream IDs (causing 400 errors), requiring ordered fallback retry chains.

How

  • Model aliases: 4 public→upstream mappings (gemini-3.5-flash-*, gemini-3-pro-preview) applied at request wrap time
  • Fallback chains: gemini-3.1-pro-high and gemini-3.1-pro-low have ordered candidate lists; Chat/Stream retry with next candidate on ErrUpstream
  • wrapRequest: new overrideModel param for fallback candidates, resolved through alias map before envelope construction
  • Model catalog: 13 antigravity models (Claude Opus/Sonnet, Gemini 3.x tiers, GPT-OSS) added to providerModels

Design decisions:

  • Unknown model IDs pass through unchanged (no allow-list restriction)
  • Fallback only triggers on ErrUpstream, not client errors
  • Single retry per candidate (no exponential backoff — that's handled upstream)

Checklist

  • go build ./internal/connectors/ passes
  • go test ./internal/connectors/ passes (8 tests)
  • make test passes
  • make vet passes
  • Documentation updated (if applicable)

- Map 4 public model IDs to upstream IDs (gemini-3.5-flash-*, gemini-3-pro-preview)
- Add fallback chains for gemini-3.1-pro-high/low on upstream 400 errors
- Apply alias resolution in wrapRequest via overrideModel param
- Retry Chat/Stream with next fallback candidate on ErrUpstream
- Add 13 antigravity models to provider catalog
@mydisha mydisha merged commit 1978379 into mydisha:main Jul 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants