feat: align Claude thinking variants with API effort levels, remove gemini-3-pro#503
feat: align Claude thinking variants with API effort levels, remove gemini-3-pro#503
Conversation
WalkthroughThis pull request updates model support across the codebase by renaming Gemini 3 Pro variants to Gemini 3.1 Pro, adding support for Claude Sonnet 4.6 Thinking with extended thinking budgets (low/medium/high), expanding Claude Opus 4.6 Thinking from a single max budget to include medium, high, and max variants, and introducing a new "max" thinking tier for budget handling. The changes span configuration definitions, model resolution logic, tests, and documentation. Estimated code review effort🎯 3 (Moderate) | ⏱️ ~30 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR aligns Claude thinking model variants with API effort levels and removes the deprecated Key changes:
Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Model Request] --> B{Has Tier Suffix?}
B -->|Yes| C[Extract Tier from Name]
B -->|No| D[Use Default Tier]
C --> E{Model Family?}
D --> E
E -->|Claude Opus 4.6| F[Opus Thinking Budgets]
E -->|Claude Sonnet 4.6| G[Sonnet Thinking Budgets]
E -->|Gemini 3 Pro| H[Gemini 3.1 Pro Levels]
E -->|Gemini 3 Flash| I[Gemini 3 Flash Levels]
F --> F1[low: 8192<br/>medium: 16384<br/>high: 32768<br/>max: 65536]
G --> G1[low: 8192<br/>medium: 16384<br/>high: 32768]
H --> H1[low, high]
I --> I1[minimal, low,<br/>medium, high]
F1 --> J[Resolved Model Config]
G1 --> J
H1 --> J
I1 --> J
J --> K{Quota Preference}
K -->|Antigravity| L[Route to Antigravity API]
K -->|Gemini CLI| M[Route to Gemini CLI API]
Last reviewed commit: a326ffd |
| @@ -254,7 +256,7 @@ export function resolveModelWithTier(requestedModel: string, options: ModelResol | |||
|
|
|||
| const budgetFamily = getBudgetFamily(resolvedModel); | |||
| const budgets = THINKING_TIER_BUDGETS[budgetFamily]; | |||
There was a problem hiding this comment.
WARNING: Potential undefined value - The type assertion (budgets as Record<string, number>)[tier] can return undefined if tier is "max" and the model is not a Claude model. Only the claude family in THINKING_TIER_BUDGETS includes max: 65536. Using "max" tier with Gemini 2.5 or other models would result in undefined thinkingBudget at runtime.
| * - Gemini 3 Pro variants: gemini-3-pro-{low,medium,high} | ||
| * - Gemini 3 Pro variants: gemini-3.1-pro-{low,medium,high} | ||
| * - Claude thinking variants: claude-{model}-thinking-{low,medium,high} | ||
| * - Claude non-thinking: claude-{model} (no -thinking suffix) |
There was a problem hiding this comment.
SUGGESTION: Outdated comment - The documentation says {low,medium,high} but Claude thinking models now also support max tier (e.g., antigravity-claude-opus-4-6-thinking-max with budget 65536). Consider updating to {low,medium,high,max}.
Code Review SummaryStatus: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Other Observations (not in diff)Issues found in unchanged code that cannot receive inline comments:
Files Reviewed (24 files)
Summary: This PR updates model references from
The PR also removes deprecated models ( |
…emini-3-pro - Add medium/high/max thinking variants for Claude Opus 4.6 (low/medium/high/max) - Add low/medium/high thinking variants for Claude Sonnet 4.6 Thinking - Add 'max' to ThinkingTier type, TIER_REGEX, and THINKING_TIER_BUDGETS - Remove antigravity-gemini-3-pro model definition - Remove gemini-3-pro-preview CLI model definition - Update all aliases, tests, docs, and scripts - Include claude-sonnet-4-6-thinking model support (supersedes PR #496) Supersedes: #496
13acb4b to
a326ffd
Compare
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/MODEL-VARIANTS.md (1)
21-33:⚠️ Potential issue | 🟡 MinorIntroductory example shows stale
maxbudget (32768) that contradicts the table below.The "Variant Configuration" example block still has
"max": { "thinkingConfig": { "thinkingBudget": 32768 } }. The updated table at line 88 and the full example at lines 105–116 both show the correct Opusmax= 65536. A reader who copies this example block will get the old budget.📝 Proposed fix
"variants": { "low": { "thinkingConfig": { "thinkingBudget": 8192 } }, - "max": { "thinkingConfig": { "thinkingBudget": 32768 } } + "medium": { "thinkingConfig": { "thinkingBudget": 16384 } }, + "high": { "thinkingConfig": { "thinkingBudget": 32768 } }, + "max": { "thinkingConfig": { "thinkingBudget": 65536 } } }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/MODEL-VARIANTS.md` around lines 21 - 33, Update the introductory JSON example for the model "antigravity-claude-opus-4-6-thinking" so the "max" variant's thinkingConfig.thinkingBudget matches the table and later example: change the "max": { "thinkingConfig": { "thinkingBudget": 32768 } } entry to use 65536 instead of 32768; ensure you only modify the "thinkingBudget" value for the "max" variant in that example.
♻️ Duplicate comments (1)
src/plugin/transform/model-resolver.ts (1)
19-20:⚠️ Potential issue | 🟠 MajorGuard “max” tier to Claude to avoid invalid Gemini tiers / undefined budgets.
With
maxnow parsed, a-maxsuffix on Gemini 3 models will emitthinkingLevel: "max", and on Gemini 2.5 models will yield an undefined budget. Consider restrictingmaxto Claude thinking models (or normalizing it) before applying tier logic.🔧 Possible guard in tier extraction
function extractThinkingTierFromModel(model: string): ThinkingTier | undefined { // Only extract tier for models that support thinking tiers if (!supportsThinkingTiers(model)) { return undefined; } const tierMatch = model.match(TIER_REGEX); - return tierMatch?.[1] as ThinkingTier | undefined; + const tier = tierMatch?.[1] as ThinkingTier | undefined; + if (tier === "max" && !model.toLowerCase().includes("claude")) { + return undefined; + } + return tier; }Does the Gemini 3 API accept a thinkingLevel of "max"? What are the supported thinkingLevel values for Gemini 3 Pro/Flash, and do Gemini 2.5 models define a "max" tier?Also applies to: 64-64, 249-255, 261-264
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/plugin/transform/model-resolver.ts` around lines 19 - 20, The mapping currently includes a "max" tier that gets applied globally (e.g., claude: { ..., max: 65536 } while gemini entries lack it), which causes Gemini models to receive thinkingLevel:"max" or undefined budgets; restrict or normalize "max" to Claude-only by removing/omitting "max" entries from Gemini mappings (e.g., only keep max on the claude mapping) and/or map any incoming "max" thinkingLevel to a safe Gemini tier (e.g., "high") in your thinking-level extraction logic so functions that use the claude and "gemini-2.5-pro" mappings never encounter undefined budgets. Ensure the change is made where the tier-size mapping and thinkingLevel parsing are defined so downstream code receives valid budgets for both claude and gemini models.
🧹 Nitpick comments (2)
docs/ANTIGRAVITY_API_SPEC.md (1)
630-633: Changelog not updated for this PR.The changelog at the bottom of the spec doesn't include an entry for the two changes made in this PR: adding the
claude-sonnet-4-6-thinkingmodel row and removing the Gemini 3 Pro rows.📝 Suggested changelog entry
+- **2025-XX-XX**: Added Claude Sonnet 4.6 Thinking model; removed Gemini 3 Pro High/Low model rows - **2025-12-14**: Added function calling quirks, JSON Schema support matrix, tool name rules - **2025-12-13**: Initial specification based on direct API testing🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/ANTIGRAVITY_API_SPEC.md` around lines 630 - 633, Update the "Changelog" section to include a new entry for this PR: add a dated bullet that notes adding the "claude-sonnet-4-6-thinking" model row and removing the "Gemini 3 Pro" rows (mention both actions explicitly), using the same date format as existing entries and a concise description; locate the changelog under the "## Changelog" header in docs/ANTIGRAVITY_API_SPEC.md and append the new bullet (or insert it as the newest date) so the spec reflects these two changes.docs/MODEL-VARIANTS.md (1)
162-163: "7 models instead of 12+" is now stale.The model definitions currently have 11 entries (as reflected in
src/plugin/config/models.test.ts). The benefit claim should be updated to match reality.📝 Suggested update
-- **Cleaner model picker** — 7 models instead of 12+ +- **Cleaner model picker** — fewer base models with variants instead of a flat list of tier-suffixed entries🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/MODEL-VARIANTS.md` around lines 162 - 163, Update the stale claim "7 models instead of 12+" in docs/MODEL-VARIANTS.md to reflect the current model count (11 as defined in src/plugin/config/models.test.ts); either change the number to "11 models" or rephrase to a non-numeric benefit (e.g., "fewer models") so the documentation matches the actual entries in the models list used by ModelVariants.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@script/test-gemini-cli-e2e.sh`:
- Around line 136-139: The stderr/stdout redirection order is wrong for the
timeout opencode run invocation (e.g., the line with timeout 60 opencode run -m
google/antigravity-gemini-3.1-pro-low "Say: ANTIGRAVITY_START" 2>&1 >
/tmp/gemini-cli-e2e-reverse-s1.log || true); change the redirect to send both
stdout and stderr into the log file by using >
/tmp/gemini-cli-e2e-reverse-s1.log 2>&1 instead of 2>&1 > ..., and apply the
same fix consistently to the other opencode run invocations that use the same
pattern so helpers like check_auth_error / check_quota_error / check_model_error
can see stderr output.
In `@src/plugin/transform/gemini.test.ts`:
- Around line 65-67: The test for isGemini3Model that reads 'returns true for
gemini-3.1-pro' is a duplicate of the other existing test asserting the same
input; remove the redundant test case (the it(...) block whose title is "returns
true for gemini-3.1-pro" and which calls
expect(isGemini3Model("gemini-3.1-pro")).toBe(true)) or alternatively change one
of the two to assert a distinct input (e.g., "gemini-3.1-pro-low" or
"gemini-3.1-pro-medium") so each test covers a unique scenario.
In `@src/plugin/transform/model-resolver.ts`:
- Line 36: Update the inline comment that lists Gemini 3 Pro variants to match
the actual supported tiers: replace "Gemini 3 Pro variants:
gemini-3.1-pro-{low,medium,high}" with "Gemini 3 Pro variants:
gemini-3.1-pro-{low,high}" (the comment near the model resolver block in
model-resolver.ts where Gemini model variants are documented).
---
Outside diff comments:
In `@docs/MODEL-VARIANTS.md`:
- Around line 21-33: Update the introductory JSON example for the model
"antigravity-claude-opus-4-6-thinking" so the "max" variant's
thinkingConfig.thinkingBudget matches the table and later example: change the
"max": { "thinkingConfig": { "thinkingBudget": 32768 } } entry to use 65536
instead of 32768; ensure you only modify the "thinkingBudget" value for the
"max" variant in that example.
---
Duplicate comments:
In `@src/plugin/transform/model-resolver.ts`:
- Around line 19-20: The mapping currently includes a "max" tier that gets
applied globally (e.g., claude: { ..., max: 65536 } while gemini entries lack
it), which causes Gemini models to receive thinkingLevel:"max" or undefined
budgets; restrict or normalize "max" to Claude-only by removing/omitting "max"
entries from Gemini mappings (e.g., only keep max on the claude mapping) and/or
map any incoming "max" thinkingLevel to a safe Gemini tier (e.g., "high") in
your thinking-level extraction logic so functions that use the claude and
"gemini-2.5-pro" mappings never encounter undefined budgets. Ensure the change
is made where the tier-size mapping and thinkingLevel parsing are defined so
downstream code receives valid budgets for both claude and gemini models.
---
Nitpick comments:
In `@docs/ANTIGRAVITY_API_SPEC.md`:
- Around line 630-633: Update the "Changelog" section to include a new entry for
this PR: add a dated bullet that notes adding the "claude-sonnet-4-6-thinking"
model row and removing the "Gemini 3 Pro" rows (mention both actions
explicitly), using the same date format as existing entries and a concise
description; locate the changelog under the "## Changelog" header in
docs/ANTIGRAVITY_API_SPEC.md and append the new bullet (or insert it as the
newest date) so the spec reflects these two changes.
In `@docs/MODEL-VARIANTS.md`:
- Around line 162-163: Update the stale claim "7 models instead of 12+" in
docs/MODEL-VARIANTS.md to reflect the current model count (11 as defined in
src/plugin/config/models.test.ts); either change the number to "11 models" or
rephrase to a non-numeric benefit (e.g., "fewer models") so the documentation
matches the actual entries in the models list used by ModelVariants.
ℹ️ Review info
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to data retention organization setting
📒 Files selected for processing (22)
README.mddocs/ANTIGRAVITY_API_SPEC.mddocs/MODEL-VARIANTS.mddocs/TROUBLESHOOTING.mdscript/test-cross-model-e2e.shscript/test-cross-model.tsscript/test-gemini-cli-e2e.shscript/test-models.tsscripts/setup-opencode-pi.shsrc/plugin/accounts.test.tssrc/plugin/antigravity-first-fallback.test.tssrc/plugin/config/models.test.tssrc/plugin/config/models.tssrc/plugin/config/updater.test.tssrc/plugin/cross-model-integration.test.tssrc/plugin/request-helpers.test.tssrc/plugin/transform/claude.test.tssrc/plugin/transform/cross-model-sanitizer.test.tssrc/plugin/transform/gemini.test.tssrc/plugin/transform/model-resolver.test.tssrc/plugin/transform/model-resolver.tssrc/plugin/transform/types.ts
💤 Files with no reviewable changes (1)
- src/plugin/config/updater.test.ts
📜 Review details
🧰 Additional context used
🧬 Code graph analysis (11)
src/plugin/transform/gemini.test.ts (1)
src/plugin/transform/gemini.ts (5)
isGeminiModel(129-132)isGemini3Model(137-139)isGemini25Model(144-146)isImageGenerationModel(152-158)applyGeminiTransforms(372-432)
src/plugin/transform/claude.test.ts (2)
src/plugin/transform/index.ts (2)
isClaudeModel(34-34)isClaudeThinkingModel(35-35)src/plugin/transform/claude.ts (2)
isClaudeModel(27-29)isClaudeThinkingModel(34-37)
src/plugin/cross-model-integration.test.ts (3)
src/plugin/transform/model-resolver.ts (1)
getModelFamily(278-287)src/plugin/transform/index.ts (2)
getModelFamily(25-25)getModelFamily(65-65)src/plugin/transform/cross-model-sanitizer.ts (1)
getModelFamily(30-34)
src/plugin/transform/model-resolver.test.ts (2)
src/plugin/transform/model-resolver.ts (1)
resolveModelWithTier(162-273)src/plugin/transform/index.ts (1)
resolveModelWithTier(22-22)
src/plugin/request-helpers.test.ts (1)
src/plugin/request-helpers.ts (1)
isThinkingCapableModel(737-742)
src/plugin/accounts.test.ts (1)
src/plugin/accounts.ts (1)
resolveQuotaGroup(239-244)
script/test-cross-model.ts (3)
src/plugin/transform/model-resolver.ts (1)
getModelFamily(278-287)src/plugin/transform/index.ts (2)
getModelFamily(25-25)getModelFamily(65-65)src/plugin/transform/cross-model-sanitizer.ts (1)
getModelFamily(30-34)
script/test-gemini-cli-e2e.sh (1)
script/test-cross-model-e2e.sh (3)
log_fail(24-24)log_pass(23-23)log_info(26-26)
src/plugin/transform/types.ts (1)
src/plugin/transform/index.ts (1)
ThinkingTier(10-10)
src/plugin/transform/cross-model-sanitizer.test.ts (3)
src/plugin/transform/model-resolver.ts (1)
getModelFamily(278-287)src/plugin/transform/index.ts (2)
getModelFamily(25-25)getModelFamily(65-65)src/plugin/transform/cross-model-sanitizer.ts (1)
getModelFamily(30-34)
src/plugin/transform/model-resolver.ts (2)
src/plugin/transform/index.ts (1)
isClaudeModel(34-34)src/plugin/transform/claude.ts (1)
isClaudeModel(27-29)
🪛 Shellcheck (0.11.0)
script/test-gemini-cli-e2e.sh
[warning] 139-139: To redirect stdout+stderr, 2>&1 must be last (or use '{ cmd > file; } 2>&1' to clarify).
(SC2069)
🔇 Additional comments (29)
src/plugin/transform/cross-model-sanitizer.test.ts (3)
13-17: Looks good—Sonnet 4.6 Thinking is covered.
Test expectation aligns with new Claude thinking variant naming.
20-23: LGTM—Gemini 3.1 naming update reflected.
331-333: Good update to target model in sanitizer test.src/plugin/antigravity-first-fallback.test.ts (1)
141-148: Consistent Gemini 3.1 Pro naming in model-specific rate-limit test.
The updated model identifier matches the renamed variant and keeps the test intent intact.src/plugin/transform/types.ts (1)
5-5: ThinkingTier updated to include max tier.
This aligns the type with the new tier support.src/plugin/accounts.test.ts (1)
1864-1867: Quota group expectation updated for Gemini 3.1 Pro.
Matches the model renaming and keeps the test aligned with resolver behavior.script/test-cross-model-e2e.sh (1)
6-6: Gemini 3.1 Pro low variant referenced consistently across E2E steps.
The rename is applied uniformly in comments and commands.Also applies to: 45-46, 70-71, 95-96, 132-133, 176-177
src/plugin/cross-model-integration.test.ts (2)
244-246: Target model updated to Gemini 3.1 Pro low.
Keeps the sanitization test aligned with renamed variants.
355-359: Model family detection expectations updated for Gemini 3.1 Pro variants.
Matches the new naming scheme without altering behavior.docs/TROUBLESHOOTING.md (1)
434-434: Migration table updated to Gemini 3.1 naming.
Documentation now matches the renamed model prefix.src/plugin/transform/claude.test.ts (3)
35-37: Non-Claude model negative test updated to Gemini 3.1 Pro.
Keeps coverage current with renamed Gemini variants.
61-64: Added coverage for prefixed Sonnet 4.6 thinking model.
This strengthens the thinking-model detection test suite.
73-75: Non-Claude thinking negative test updated to Gemini 3.1 Pro thinking.
Matches new naming conventions.src/plugin/request-helpers.test.ts (1)
173-175: Thinking-capable model test updated for Gemini 3.1 Pro.
Keeps the expectation in sync with model renames.script/test-cross-model.ts (1)
61-68: LGTM.The rename from
gemini-3-pro-low→gemini-3.1-pro-lowis consistent with the broader model-rename in this PR.isGeminiModeldetects the"gemini"substring so the assertion still holds.scripts/setup-opencode-pi.sh (1)
35-42: LGTM.Clean rename — model key and display name both updated consistently; the limit/modalities/variants block is correctly preserved as-is.
src/plugin/transform/gemini.test.ts (1)
607-618: LGTM.The new
isImageGenerationModelnegative test forclaude-sonnet-4-6-thinking(line 617) is a good addition, and the rename ofgemini-3-pro→gemini-3.1-proon line 608 is consistent with the rest of the file.script/test-models.ts (1)
9-31: LGTM.Test matrix correctly reflects all PR changes: 3.1-pro rename, new Sonnet 4.6 thinking variants (low/medium/high, no max), and Opus
maxtier addition. Absence ofantigravity-claude-sonnet-4-6-thinking-maxaligns with the stated constraint that Sonnet does not support the max tier.src/plugin/config/models.test.ts (1)
14-58: LGTM.Model name list and variant/budget expectations accurately reflect the new additions (Sonnet 4.6 thinking, Opus
maxtier) and the removal ofantigravity-gemini-3-pro. Sonnet correctly has nomaxvariant.src/plugin/config/models.ts (2)
66-75: Sonnet 4.6 thinking variants look consistent with the intended budgets.
81-85: Opus 4.6 thinking tier expansion looks good.src/plugin/transform/model-resolver.ts (4)
4-4: Comment updates align with the 3.1 naming and examples.Also applies to: 154-156, 186-187
53-57: Alias additions for Claude Sonnet/Opus thinking variants look good.
171-178: Gemini CLI‑only routing rule looks consistent with the preview handling.
334-335: Tier suffix handling now consistently accounts for “max.”Also applies to: 349-350, 399-400
src/plugin/transform/model-resolver.test.ts (3)
30-36: Preview quota behavior test looks correct.
102-148: Great coverage for the new Claude thinking tiers and budgets.
178-184: Image model explicit‑quota assertion looks good.README.md (1)
9-13: Doc updates align well with the new model names and thinking tiers.Also applies to: 123-125, 133-134, 188-207, 433-434, 571-572
| log_info "Step 1: Start with antigravity-gemini-3.1-pro-low..." | ||
| timeout 60 opencode run -m google/antigravity-gemini-3.1-pro-low \ | ||
| "Say: ANTIGRAVITY_START" \ | ||
| 2>&1 > /tmp/gemini-cli-e2e-reverse-s1.log || true |
There was a problem hiding this comment.
Stderr redirect order is wrong — error logs may be lost to terminal instead of captured in file.
2>&1 > file redirects stderr to stdout's current destination (the terminal) and then redirects stdout to the file, so only stdout lands in the log file. The check_auth_error / check_quota_error / check_model_error helpers would miss any errors written to stderr.
This same pattern exists in the pre-existing code at lines 53, 111, 124, and 151; fixing it here makes the new test consistent with the correct behaviour rather than the existing incorrect pattern.
🐛 Proposed fix
-timeout 60 opencode run -m google/antigravity-gemini-3.1-pro-low \
- "Say: ANTIGRAVITY_START" \
- 2>&1 > /tmp/gemini-cli-e2e-reverse-s1.log || true
+timeout 60 opencode run -m google/antigravity-gemini-3.1-pro-low \
+ "Say: ANTIGRAVITY_START" \
+ > /tmp/gemini-cli-e2e-reverse-s1.log 2>&1 || trueThe same fix (> file 2>&1) should be applied consistently to lines 53, 111, 124, and 151 as well.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| log_info "Step 1: Start with antigravity-gemini-3.1-pro-low..." | |
| timeout 60 opencode run -m google/antigravity-gemini-3.1-pro-low \ | |
| "Say: ANTIGRAVITY_START" \ | |
| 2>&1 > /tmp/gemini-cli-e2e-reverse-s1.log || true | |
| log_info "Step 1: Start with antigravity-gemini-3.1-pro-low..." | |
| timeout 60 opencode run -m google/antigravity-gemini-3.1-pro-low \ | |
| "Say: ANTIGRAVITY_START" \ | |
| > /tmp/gemini-cli-e2e-reverse-s1.log 2>&1 || true |
🧰 Tools
🪛 Shellcheck (0.11.0)
[warning] 139-139: To redirect stdout+stderr, 2>&1 must be last (or use '{ cmd > file; } 2>&1' to clarify).
(SC2069)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@script/test-gemini-cli-e2e.sh` around lines 136 - 139, The stderr/stdout
redirection order is wrong for the timeout opencode run invocation (e.g., the
line with timeout 60 opencode run -m google/antigravity-gemini-3.1-pro-low "Say:
ANTIGRAVITY_START" 2>&1 > /tmp/gemini-cli-e2e-reverse-s1.log || true); change
the redirect to send both stdout and stderr into the log file by using >
/tmp/gemini-cli-e2e-reverse-s1.log 2>&1 instead of 2>&1 > ..., and apply the
same fix consistently to the other opencode run invocations that use the same
pattern so helpers like check_auth_error / check_quota_error / check_model_error
can see stderr output.
| it("returns true for gemini-3.1-pro", () => { | ||
| expect(isGemini3Model("gemini-3.1-pro")).toBe(true); | ||
| }); |
There was a problem hiding this comment.
Duplicate test case introduced by rename.
After renaming line 66 from "gemini-3-pro" to "gemini-3.1-pro", this test is now identical (both description and assertion) to the already-existing test at lines 77–79. One of the two should be removed or the description on the original at line 77 should be updated to cover a distinct input (e.g., "gemini-3.1-pro-low" or "gemini-3.1-pro-medium").
🛠️ Proposed fix — remove the duplicate
- it("returns true for gemini-3.1-pro", () => {
- expect(isGemini3Model("gemini-3.1-pro")).toBe(true);
- });
-
it("returns true for gemini-3.1-pro-high", () => {
expect(isGemini3Model("gemini-3.1-pro-high")).toBe(true);
});📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| it("returns true for gemini-3.1-pro", () => { | |
| expect(isGemini3Model("gemini-3.1-pro")).toBe(true); | |
| }); | |
| it("returns true for gemini-3.1-pro-high", () => { | |
| expect(isGemini3Model("gemini-3.1-pro-high")).toBe(true); | |
| }); |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/plugin/transform/gemini.test.ts` around lines 65 - 67, The test for
isGemini3Model that reads 'returns true for gemini-3.1-pro' is a duplicate of
the other existing test asserting the same input; remove the redundant test case
(the it(...) block whose title is "returns true for gemini-3.1-pro" and which
calls expect(isGemini3Model("gemini-3.1-pro")).toBe(true)) or alternatively
change one of the two to assert a distinct input (e.g., "gemini-3.1-pro-low" or
"gemini-3.1-pro-medium") so each test covers a unique scenario.
| * | ||
| * Format: | ||
| * - Gemini 3 Pro variants: gemini-3-pro-{low,medium,high} | ||
| * - Gemini 3 Pro variants: gemini-3.1-pro-{low,medium,high} |
There was a problem hiding this comment.
Comment lists an unsupported medium tier for Gemini 3.1 Pro.
The code and model definitions only expose low/high for Gemini 3.1 Pro; the comment should match that.
📝 Suggested fix
- * - Gemini 3 Pro variants: gemini-3.1-pro-{low,medium,high}
+ * - Gemini 3 Pro variants: gemini-3.1-pro-{low,high}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| * - Gemini 3 Pro variants: gemini-3.1-pro-{low,medium,high} | |
| * - Gemini 3 Pro variants: gemini-3.1-pro-{low,high} |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/plugin/transform/model-resolver.ts` at line 36, Update the inline comment
that lists Gemini 3 Pro variants to match the actual supported tiers: replace
"Gemini 3 Pro variants: gemini-3.1-pro-{low,medium,high}" with "Gemini 3 Pro
variants: gemini-3.1-pro-{low,high}" (the comment near the model resolver block
in model-resolver.ts where Gemini model variants are documented).
Summary
Supersedes #496 — includes all Sonnet 4.6 Thinking model support from that PR plus:
low(8192),medium(16384),high(32768),max(65536)low(8192),medium(16384),high(32768) — nomax(not supported by Sonnet)gemini-3-profrom both Antigravity (antigravity-gemini-3-pro) and CLI (gemini-3-pro-preview) model definitionsmaxtier support toThinkingTiertype,TIER_REGEX, andTHINKING_TIER_BUDGETSChanges
models.tsmodel-resolver.tstypes.ts"max"to ThinkingTier union.Closes #496