Skip to content

feat: add GPT-OSS model family support - #354

Open
labsclaw wants to merge 1 commit into
badrisnarayanan:mainfrom
labsclaw:feat/gpt-oss-support
Open

feat: add GPT-OSS model family support#354
labsclaw wants to merge 1 commit into
badrisnarayanan:mainfrom
labsclaw:feat/gpt-oss-support

Conversation

@labsclaw

Copy link
Copy Markdown

Summary

Adds support for GPT-OSS models (e.g. gpt-oss-120b-medium) served via the Antigravity Cloud Code API.

Previously, only Claude and Gemini families were recognized — any other model family was silently filtered out as 'unknown' and hidden from the WebUI. This patch adds 'gpt-oss' as a third recognized family.

Changes

  • src/constants.jsgetModelFamily() returns 'gpt-oss' when model ID contains gpt-oss
  • src/cloudcode/model-api.jsisSupportedModel() accepts gpt-oss family (enables /v1/models listing + quota tracking)
  • public/js/data-store.js — Frontend getModelFamily() recognizes gpt-oss (no longer defaults to 'other' which means hidden)
  • public/views/models.html — Added GPT filter button alongside ALL / CLAUDE / GEMINI (neon-cyan styling)
  • public/js/components/model-dropdown.js — Added GPT-OSS group in model selector dropdown

Motivation

Google has begun serving GPT-OSS models (OpenAI open-source) through the Antigravity Cloud Code API alongside Claude and Gemini. Users with Antigravity accounts can now access gpt-oss-120b-medium and similar models, but the proxy rejects them with "Invalid model" because the family filter only recognizes claude and gemini.

Testing

  • Verified gpt-oss-120b-medium appears in GET /v1/models response
  • Verified successful API call: POST /v1/messages with model: gpt-oss-120b-medium returns 200 OK
  • Verified WebUI Models page shows GPT filter button and GPT-OSS quota rows per account

- Add 'gpt-oss' to getModelFamily() in constants.js (backend)
- Add 'gpt-oss' to isSupportedModel() in model-api.js (backend)
- Add 'gpt-oss' to getModelFamily() in data-store.js (frontend)
- Add GPT filter button in models.html (WebUI)
- Add GPT-OSS group in model-dropdown.js (WebUI)

Enables proxy to recognize and route GPT-OSS models (e.g.
gpt-oss-120b-medium) served via Antigravity, alongside existing
Claude and Gemini families.
@lunalimadev-sketch

Copy link
Copy Markdown

Hi! 👋 Just checking in on this PR. All CI checks have passed and there are no merge conflicts — looks ready to go.

This feature would unlock GPT-OSS model routing through the proxy, which is a nice addition alongside Claude and Gemini support.

Would love to get this reviewed and merged when someone has a chance. Thanks for the great work! 🚀

@kenny000666

Copy link
Copy Markdown

FYI — I've opened PR #357 (fix: include tool call id for non-Claude, non-Gemini models) which is a companion fix needed for GPT-OSS (and any future non-Gemini model family) to work with tool calls.

The issue: functionCall.id and functionResponse.id are only set for Claude models (isClaudeModel guard). Google Cloud Code API requires these IDs for all models except Gemini (which uses thoughtSignature instead). Without this fix, GPT-OSS models will fail with:

Expected the 'id' of a(n) 'assistant' 'tool_calls' array element to be populated.

The fix changes isClaudeModel!isGeminiModel in src/format/content-converter.js, which is backwards-compatible and enables tool calls for any new model family.

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.

3 participants