Skip to content

feat: recognize gpt-oss family in getModelFamily / isSupportedModel - #362

Open
Luckycat133 wants to merge 1 commit into
badrisnarayanan:mainfrom
Luckycat133:feat/gpt-oss-family
Open

feat: recognize gpt-oss family in getModelFamily / isSupportedModel#362
Luckycat133 wants to merge 1 commit into
badrisnarayanan:mainfrom
Luckycat133:feat/gpt-oss-family

Conversation

@Luckycat133

Copy link
Copy Markdown

The Antigravity desktop app now exposes OpenAI's open-weight GPT-OSS 120B (Medium) model alongside the Claude and Gemini tiers. The proxy currently rejects these names in isValidModel() because getModelFamily() only recognises the claude / gemini substrings, so any crouter antigravity-claude --model gpt-oss-120b-medium (or direct API call to /v1/messages) returns invalid_request_error: Invalid model: gpt-oss-120b-medium.

This adds a third family branch for any name containing gpt-oss and extends isSupportedModel() accordingly. Request/response conversion falls through the family-agnostic path, which uses the same Google Generative-AI envelope the Gemini path uses upstream.

Patch scope is intentionally minimal — no MODEL_FALLBACK_MAP entries (need observed quota behavior first) and no converter changes (need observed tool-use / thinking behavior first). Happy to follow up with either once the validation change is in production.

Companion: Luckycat133/crouter b80e16c ships a local sed-based patcher (bin/antigravity-proxy-patch) that applies the same change idempotently on a local proxy checkout, so crouter users can use GPT-OSS today without waiting for the upstream merge.

The Antigravity desktop app now exposes OpenAI's open-weight GPT-OSS 120B
model alongside the Claude and Gemini tiers. The proxy's request
validation rejects any non-Claude/Gemini family name with
"Invalid model: gpt-oss-120b-medium", so a Claude Code client pointing
at the proxy cannot reach the GPT-OSS endpoint.

getModelFamily() is the single chokepoint (its result gates listModels,
getModelQuotas, isValidModel). Adding a third family branch unblocks
GPT-OSS without touching request/response conversion — those fall
through the family-agnostic path, which uses the same Google
Generative-AI envelope the Gemini path uses upstream.

Out of scope (deferred to follow-ups after observing quota / tool-use
behaviour upstream):
- MODEL_FALLBACK_MAP entries for gpt-oss
- request/response converter branches for gpt-oss-specific tool_use /
  thinking handling
Luckycat133 added a commit to Luckycat133/crouter that referenced this pull request Aug 8, 2026
The upstream PR is now live at badrisnarayanan/antigravity-claude-proxy#362,
so the "How to submit" walkthrough is obsolete. Replace it with a status
section pointing at the live PR, plus the local-fallback paragraph that
remains useful until #362 merges.

Co-Authored-By: Claude <noreply@anthropic.com>
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.

1 participant