Skip to content

google-antigravity-auth plugin writes invalid api value in models.json, breaking claude-opus-4-6-thinking #13141

@navendugoyal19

Description

@navendugoyal19

Bug Description

After every OpenClaw update, the model google-antigravity/claude-opus-4-6-thinking disappears from the model picker with a "model not in catalogue" error. All other Google Antigravity models (claude-sonnet-4-5, claude-sonnet-4-5-thinking, gemini-3-flash, gemini-3-pro-high, gemini-3-pro-low, gpt-oss-120b-medium, claude-opus-4-5-thinking) work correctly.

Root Cause

The google-antigravity-auth plugin (in extensions/google-antigravity-auth/index.ts) registers claude-opus-4-6-thinking as its DEFAULT_MODEL. When OpenClaw updates and regenerates ~/.openclaw/agents/main/agent/models.json, the entry for this model gets written with:

{
  "id": "claude-opus-4-6-thinking",
  "api": "google-antigravity-cli",
  "name": "Claude Opus 4.6 Thinking",
  "reasoning": true
}

The api field value "google-antigravity-cli" is invalid. The isGoogleModelApi() function in src/agents/pi-embedded-helpers/google.ts only accepts three values:

  • "google-antigravity"
  • "google-gemini-cli"
  • "google-generative-ai"

Because "google-antigravity-cli" doesn't match any valid API type, the ModelRegistry from @mariozechner/pi-coding-agent rejects the entry entirely, and the model never appears in the catalog.

Why Other Models Are Unaffected

Other antigravity models (claude-sonnet-4-5, gemini-3-flash, etc.) are served from the built-in catalog in pi-coding-agent and don't rely on the models.json entry. Only claude-opus-4-6-thinking requires a manual entry because it's not yet in the built-in catalog.

Steps to Reproduce

  1. Have Google Antigravity auth configured and working
  2. Update OpenClaw (e.g., openclaw update)
  3. Open the model picker and filter by google-antigravity
  4. Observe that claude-opus-4-6-thinking is missing while all other antigravity models are present
  5. Check ~/.openclaw/agents/main/agent/models.json — the opus 4.6 entry has "api": "google-antigravity-cli" (invalid)

Workaround

Manually edit ~/.openclaw/agents/main/agent/models.json and change the api field from "google-antigravity-cli" to "google-antigravity":

"google-antigravity": {
  "baseUrl": "https://google-antigravity.com/v1",
  "models": [
    {
      "id": "claude-opus-4-6-thinking",
      "api": "google-antigravity",
      "name": "Claude Opus 4.6 Thinking",
      "reasoning": true
    }
  ]
}

This fix must be re-applied after every update.

Suggested Fix

The code that generates the models.json entry for the google-antigravity provider (likely in the plugin or in src/agents/models-config.ts / normalizeProviders()) should use "google-antigravity" as the api value, not "google-antigravity-cli".

Alternatively, claude-opus-4-6-thinking could be added to the built-in model catalog in @mariozechner/pi-coding-agent alongside the other antigravity models.

Relevant Source Files

  • extensions/google-antigravity-auth/index.ts — plugin that sets DEFAULT_MODEL
  • src/agents/pi-embedded-helpers/google.tsisGoogleModelApi() validation
  • src/agents/models-config.tsensureOpenClawModelsJson() regenerates models.json
  • src/agents/model-catalog.ts — loads ModelRegistry from models.json

Environment

  • OpenClaw version: 2026.2.9 (33c75cb)
  • Platform: macOS (darwin)
  • Auth: Google Antigravity OAuth

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleMarked as stale due to inactivity

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions