Skip to content

fix(#8136): expand pro-low fallback chain with gemini-pro-agent and pro-high - #8192

Closed
rafaumeu wants to merge 2 commits into
diegosouzapw:release/v3.8.49from
rafaumeu:fix/antigravity-deprecated-models-8136
Closed

rafaumeu wants to merge 2 commits into
diegosouzapw:release/v3.8.49from
rafaumeu:fix/antigravity-deprecated-models-8136

Conversation

@rafaumeu

Copy link
Copy Markdown
Contributor

Closes #8136

Problem

gemini-3.1-pro-low and gemini-3-pro-low both return HTTP 400 from the Antigravity upstream after a silent rename. The fallback chain for gemini-3.1-pro-low only had these two candidates, so the chain was exhausted immediately with no working alternative.

Fix

Expanded the gemini-3.1-pro-low fallback chain to include gemini-pro-agent (CLIProxyAPI's id) and gemini-3.1-pro-high as additional candidates:

```
gemini-3.1-pro-low → gemini-3-pro-low → gemini-pro-agent → gemini-3.1-pro-high
```

This gives the executor two more chances to hit a working upstream id before surfacing the 400 error.

Testing

  • Updated the unit test asserting the pro-low chain shape
  • All 8 existing chain behavioral tests pass (retries, exhausted-chain, happy path, non-pro isolation)

@rafaumeu
rafaumeu requested a review from diegosouzapw as a code owner July 22, 2026 16:39
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@diegosouzapw

Copy link
Copy Markdown
Owner

Thanks for the fix — the gemini-3.1-pro-low fallback chain expansion (adding gemini-pro-agent and gemini-3.1-pro-high) is correct and well tested; I verified the release tip still only has the old 2-candidate chain, so this closes #8136 as intended.

However, this PR is based on main, which is currently far behind release/v3.8.49, and it bundles 7 other commits (#8074, #8072, #8059, #8081, #8056, #8141) that already have their own PRs open against release/v3.8.49 (#8165, #8062, #8162, #8058, #8143). Merging this branch as-is would revert already-merged work on the release branch:

  • It reverts the Claude Antigravity contextLength fix (1,048,576 → 200,000 for claude-sonnet-5 / claude-opus-4-6-thinking / claude-sonnet-4-6), which landed on release via fix(models): update Anthropic model contextLength to 1M #7129 after this branch was cut.
  • It deletes 5 behavioral tests in tests/unit/agy-pro-fallback-chain-3786.test.ts that already exist on release tip (exception-handling, AbortError propagation, mixed 400/throw paths) because this branch predates them.

We'll extract just the open-sse/config/antigravityModelAliases.ts pro-low chain change (plus the matching test assertion) onto release/v3.8.49 and merge that piece — the other 7 commits will be handled through their existing sibling PRs instead, so nothing is lost. No action needed on your end unless you'd like to re-open future fixes directly against release/v3.8.49 to avoid this kind of base-drift bundling.

@diegosouzapw
diegosouzapw changed the base branch from main to release/v3.8.49 July 22, 2026 18:28
@rafaumeu
rafaumeu force-pushed the fix/antigravity-deprecated-models-8136 branch 4 times, most recently from 46e3e5a to 7441966 Compare July 22, 2026 22:32
@mergify

mergify Bot commented Jul 22, 2026

Copy link
Copy Markdown

⚠️ The sha of the head commit of this PR conflicts with #8113. Mergify cannot evaluate rules on this PR. Once #8113 is merged or closed, Mergify will resume processing this PR. ⚠️

@rafaumeu
rafaumeu force-pushed the fix/antigravity-deprecated-models-8136 branch 5 times, most recently from 0a765ef to 48638c6 Compare July 23, 2026 02:10
rafaumeu added 2 commits July 22, 2026 23:44
…ni-pro-agent and pro-high

Closes diegosouzapw#8136

The gemini-3.1-pro-low fallback chain only had two candidates
(gemini-3.1-pro-low → gemini-3-pro-low), both returning HTTP 400
after the upstream rename. Added gemini-pro-agent (CLIProxyAPI's id)
and gemini-3.1-pro-high as additional candidates so the chain has a
chance of hitting a working upstream id before surfacing the error.

Updated test to match the expanded chain. All 8 existing chain tests
pass.
@rafaumeu
rafaumeu force-pushed the fix/antigravity-deprecated-models-8136 branch from 48638c6 to eb0322e Compare July 23, 2026 02:47
@diegosouzapw

Copy link
Copy Markdown
Owner

Thanks, @rafaumeu! 🙏 Closing this one — after rebasing onto the current release tip, the expanded pro-low chain adds a gemini-3.1-pro-high fallback, but release/v3.8.49 (post-#8013) has a guard test (agy-pro-fallback-chain-3786.test.ts) asserting that rejected pro-high discovery ids have NO fallback chain, so this conflicts semantically (2 tests fail). The pro-low expansion with gemini-pro-agent is still valuable — a focused re-submit against the current tip that keeps pro-high out of the chain (or updates the guard with a rationale) would merge cleanly. 🙏

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.

fix(providers): Antigravity Pro fallback re-attempts deprecated gemini-3.1-pro-low every request (no lockout)

2 participants