#13119: fix: add forward-compat for google-antigravity claude-opus-4-6 models
agents
stale
Cluster:
OpenAI Model Fixes and Updates
## Summary
When antigravity updates their model catalog to include `claude-opus-4-6-thinking`, OpenClaw's pi-ai registry may not have the new ID yet, causing "Unknown model: google-antigravity/claude-opus-4-6-thinking" errors.
This adds a forward-compat fallback that maps `claude-opus-4-6` variants to their `claude-opus-4-5` equivalents for the `google-antigravity` provider, similar to the existing `anthropic` provider handling in `resolveAnthropicOpus46ForwardCompatModel`.
## Changes
- Added `resolveAntigravityOpus46ForwardCompatModel()` function that:
- Detects claude-opus-4-6 model IDs for google-antigravity provider
- Maps them to claude-opus-4-5 equivalents in the registry
- Falls back to synthetic model definition if no template found
- Properly sets `reasoning: true` for `-thinking` variants
## Models Fixed
- `google-antigravity/claude-opus-4-6`
- `google-antigravity/claude-opus-4-6-thinking`
- `google-antigravity/claude-opus-4.6`
## Test Plan
- [ ] Verify `google-antigravity/claude-opus-4-6-thinking` resolves without "Unknown model" error
- [ ] Verify model inherits correct settings from claude-opus-4-5-thinking template
- [ ] Verify `-thinking` variants have `reasoning: true`
🤖 Generated with [Claude Code](https://claude.ai/code)
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This change adds a `google-antigravity`-specific forward-compat resolver in `src/agents/pi-embedded-runner/model.ts` that detects `claude-opus-4-6` / `claude-opus-4.6` (and `-thinking` variants) and maps them to `claude-opus-4-5` / `claude-opus-4.5` template models from the pi-ai registry when available. If no template exists, it synthesizes a minimal `anthropic-messages` model definition, setting `reasoning: true` when the requested model id contains `thinking`.
The resolver is wired into `resolveModel()` alongside the existing OpenAI Codex and Anthropic Opus forward-compat fallbacks, so users won’t hit `Unknown model: google-antigravity/...` when antigravity’s catalog updates faster than the local registry.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk.
- The change is narrowly scoped to model resolution fallback logic, follows the existing forward-compat pattern used for other providers, and only activates for the `google-antigravity` provider with specific `claude-opus-4-6` model id patterns. No functional regressions were identified in the surrounding call sites.
- src/agents/pi-embedded-runner/model.ts
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#23250: feat: add Sonnet 4.6 forward compat for google-antigravity
by Oceanswave · 2026-02-22
86.7%
#18697: fix: include forward-compat models in model catalog for allowlist val…
by dmitry-orabey · 2026-02-17
86.3%
#13361: fix(google-antigravity): add Opus 4.6 support and fix thinking.sign...
by SovranAMR · 2026-02-10
85.5%
#12220: fix: forward-compat models now respect user-configured contextWindow
by Batuhan4 · 2026-02-09
84.9%
#16891: fix(models): generic opus-4-6 forward-compat for all providers
by battman21 · 2026-02-15
83.8%
#11464: feat(models): add forward-compat fallback for gemini-3-pro-image
by ben-milanko · 2026-02-07
82.0%
#20095: fix(model-forward-compat): extend claude-sonnet-4.6 forward-compat ...
by SeeYangZhi · 2026-02-18
82.0%
#21181: fix(models): add gemini-3.1-pro-preview forward-compat for google-g...
by Mellowambience · 2026-02-19
81.9%
#19533: fix: allow forward-compat models in buildAllowedModelSet
by Anthony-g-dev · 2026-02-17
81.1%
#21263: fix: add google-vertex support for Gemini 3.1 models
by pdd-cli · 2026-02-19
81.1%