Skip to content
This repository was archived by the owner on Mar 30, 2026. It is now read-only.

feat: Add Claude Sonnet 4.6 Thinking model support#496

Closed
sk0x0y wants to merge 1 commit intoNoeFabris:mainfrom
sk0x0y:feat/claude-sonnet-4-6-thinking
Closed

feat: Add Claude Sonnet 4.6 Thinking model support#496
sk0x0y wants to merge 1 commit intoNoeFabris:mainfrom
sk0x0y:feat/claude-sonnet-4-6-thinking

Conversation

@sk0x0y
Copy link
Copy Markdown

@sk0x0y sk0x0y commented Feb 20, 2026

Summary

Adds support for antigravity-claude-sonnet-4-6-thinking model with extended thinking capabilities.

Changes

  • Added antigravity-claude-sonnet-4-6-thinking model definition with thinkingConfig variants (matching existing Opus 4.6 Thinking pattern):
    • low: thinkingBudget: 8192
    • max: thinkingBudget: 32768

Model Definition

"antigravity-claude-sonnet-4-6-thinking": {
  name: "Claude Sonnet 4.6 Thinking (Antigravity)",
  limit: { context: 200000, output: 64000 },
  modalities: { input: ["text", "image", "pdf"], output: ["text"] },
  variants: {
    low: { thinkingConfig: { thinkingBudget: 8192 } },
    max: { thinkingConfig: { thinkingBudget: 32768 } },
  },
}

Variant Options

Following the existing antigravity-claude-opus-4-6-thinking pattern:

  • No variant (dynamic): Model decides thinking budget automatically
  • low: thinkingBudget: 8192
  • max: thinkingBudget: 32768

Evidence

Google Antigravity now supports Claude Sonnet 4.6 (thinking) as an official reasoning model:

Use Case

Enables users to use thinking capabilities with Sonnet 4.6:

"unspecified-low": {
  "model": "google/antigravity-claude-sonnet-4-6-thinking",
  "variant": "low"
}

Related

Testing

  • Model definition compiles without errors
  • Variants map correctly to API parameters
  • Request transformation handles thinking budget correctly

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 20, 2026

Walkthrough

This pull request adds support for the Claude Sonnet 4.6 Thinking model (antigravity-claude-sonnet-4-6-thinking) across the codebase. Changes include:

  1. Documentation updates: Added model entries in README.md, ANTIGRAVITY_API_SPEC.md, and MODEL-VARIANTS.md with context limit of 200,000, output limit of 64,000, and thinking budget variants (low: 8192, max: 32768).
  2. Configuration: Added the model definition to src/plugin/config/models.ts with matching specifications.
  3. Test coverage: Updated multiple test files (models.test.ts, claude.test.ts, cross-model-sanitizer.test.ts, gemini.test.ts, model-resolver.test.ts) to verify the new model is properly recognized.
  4. Model aliases: Added three alias mappings in model-resolver.ts for gemini-claude-sonnet-4-6-thinking variants (low, medium, high) resolving to the base model.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the primary change: adding support for Claude Sonnet 4.6 Thinking model.
Linked Issues check ✅ Passed The PR implements the core requirements from issue #495: adds the missing model entry with correct metadata, context/output limits, modalities, and thinking variants, though with 'low'/'max' instead of 'low'/'medium'/'high'.
Out of Scope Changes check ✅ Passed All changes are scoped to adding the 'antigravity-claude-sonnet-4-6-thinking' model: configuration files, documentation, model definitions, and corresponding test updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description clearly describes the addition of the antigravity-claude-sonnet-4-6-thinking model with thinkingConfig variants, matching the changeset across README, documentation, configuration, and test files.

✏️ 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Feb 20, 2026

Greptile Summary

Added support for Claude Sonnet 4.6 Thinking model with extended thinking capabilities. The implementation follows the established pattern from antigravity-claude-opus-4-6-thinking with low (8192 tokens) and max (32768 tokens) thinking budget variants.

Key changes:

  • Added model definition in src/plugin/config/models.ts with low and max variants
  • Added model aliases in src/plugin/transform/model-resolver.ts for tier suffix support (-low, -medium, -high)
  • Added comprehensive test coverage across 5 test files
  • Updated documentation in README, MODEL-VARIANTS.md, and ANTIGRAVITY_API_SPEC.md

Issues found:

  • README.md documents incorrect variants (low, medium, high instead of low, max) - this creates confusion as the actual model definition only defines low and max variants
  • Missing test case in models.test.ts to validate the new model's variant structure

Confidence Score: 3/5

  • Safe to merge after fixing the documentation inconsistency in README.md
  • The implementation is solid and follows existing patterns correctly, but the documentation error in README.md is misleading and must be fixed to avoid user confusion about supported variants
  • README.md requires correction of the variants list to match the actual implementation (low, max not low, medium, high)

Important Files Changed

Filename Overview
README.md Documented model with incorrect variants (low, medium, high should be low, max)
src/plugin/config/models.ts Added model definition with correct low and max variants matching Opus pattern
src/plugin/config/models.test.ts Added model to sorted list test, but missing variant validation test
src/plugin/transform/model-resolver.ts Added model aliases for medium and high tier support, correctly handles all variants

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User Request: antigravity-claude-sonnet-4-6-thinking] --> B{Has Variant Suffix?}
    B -->|No suffix| C[resolveModelWithTier]
    B -->|With -low/-medium/-high| C
    C --> D[Strip 'antigravity-' prefix]
    D --> E[Extract tier from suffix]
    E --> F{Tier extracted?}
    F -->|Yes: low/medium/high| G[Map to thinking budget]
    F -->|No tier| H[Use default max budget: 32768]
    G --> I[low: 8192<br/>medium: 16384<br/>high: 32768]
    H --> J[claude-sonnet-4-6-thinking]
    I --> J
    J --> K[Return ResolvedModel with thinkingBudget]
    
    style A fill:#e1f5ff
    style J fill:#ffe1e1
    style K fill:#e1ffe1
Loading

Last reviewed commit: 55dd862

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Comment thread README.md
| `antigravity-gemini-3.1-pro` | low, high | Gemini 3.1 Pro with thinking (rollout-dependent) |
| `antigravity-gemini-3-flash` | minimal, low, medium, high | Gemini 3 Flash with thinking |
| `antigravity-claude-sonnet-4-6` | — | Claude Sonnet 4.6 |
| `antigravity-claude-sonnet-4-6-thinking` | low, medium, high | Claude Sonnet 4.6 with extended thinking |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variants list is inconsistent with the actual model definition. The model defines low and max variants (matching antigravity-claude-opus-4-6-thinking on line 125), not low, medium, high.

Suggested change
| `antigravity-claude-sonnet-4-6-thinking` | low, medium, high | Claude Sonnet 4.6 with extended thinking |
| `antigravity-claude-sonnet-4-6-thinking` | low, max | Claude Sonnet 4.6 with extended thinking |
Prompt To Fix With AI
This is a comment left during a code review.
Path: README.md
Line: 124

Comment:
Variants list is inconsistent with the actual model definition. The model defines `low` and `max` variants (matching `antigravity-claude-opus-4-6-thinking` on line 125), not `low, medium, high`.

```suggestion
| `antigravity-claude-sonnet-4-6-thinking` | low, max | Claude Sonnet 4.6 with extended thinking |
```

How can I resolve this? If you propose a fix, please make it concise.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Feb 20, 2026

Additional Comments (1)

src/plugin/config/models.test.ts
Consider adding test case for antigravity-claude-sonnet-4-6-thinking variants to match the pattern of the Opus test.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/plugin/config/models.test.ts
Line: 52-57

Comment:
Consider adding test case for `antigravity-claude-sonnet-4-6-thinking` variants to match the pattern of the Opus test.

<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>

How can I resolve this? If you propose a fix, please make it concise.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (4)
src/plugin/transform/gemini.test.ts (1)

615-618: LGTM — the new assertion is correct; isImageGenerationModel won't match the "thinking" suffix.

Optional nit: the test title says "thinking variants" (plural) but only tests one. If you want exhaustive coverage you could also add "claude-sonnet-4-6-thinking-low", but this is not necessary given the purely substring-based implementation.

🤖 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 615 - 618, Test title says
"thinking variants" (plural) but only asserts one variant; update the spec in
src/plugin/transform/gemini.test.ts for the isImageGenerationModel checks:
either change the it(...) title to singular ("thinking variant") or add an
additional assertion such as
expect(isImageGenerationModel("claude-sonnet-4-6-thinking-low")).toBe(false) so
the title and assertions match; reference the isImageGenerationModel calls in
the failing test block and adjust accordingly.
docs/MODEL-VARIANTS.md (1)

163-172: Optional: add Sonnet 4.6 Thinking tier-suffixed names to the "Tier-Suffixed Names" inventory.

The resolver supports antigravity-claude-sonnet-4-6-thinking-{low,medium,high} (same path as the Opus variants), but this section only lists Opus entries. Users who rely on tier-suffixed model strings won't know these are accepted.

📝 Suggested addition
 - `antigravity-claude-opus-4-6-thinking-low`
 - `antigravity-claude-opus-4-6-thinking-medium`
 - `antigravity-claude-opus-4-6-thinking-high`
+- `antigravity-claude-sonnet-4-6-thinking-low`
+- `antigravity-claude-sonnet-4-6-thinking-medium`
+- `antigravity-claude-sonnet-4-6-thinking-high`
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/MODEL-VARIANTS.md` around lines 163 - 172, Update the "Tier-suffixed
model names" list to include the Sonnet 4.6 Thinking variants that the resolver
supports: add entries for antigravity-claude-sonnet-4-6-thinking-low,
antigravity-claude-sonnet-4-6-thinking-medium, and
antigravity-claude-sonnet-4-6-thinking-high (matching the same path as the Opus
variants) so users relying on tier-suffixed strings see they are accepted.
src/plugin/config/models.test.ts (1)

52-57: Consider extending the variant assertion to cover the new Sonnet 4.6 Thinking model.

The "defines thinking budget variants for Claude thinking models" suite only asserts against antigravity-claude-opus-4-6-thinking. Since the PR also adds antigravity-claude-sonnet-4-6-thinking with the same variant shape, this is a natural fit to validate here. Without it, the variant definition for the new model is exercised only indirectly through the resolver tests.

🛠️ Suggested addition
  it("defines thinking budget variants for Claude thinking models", () => {
    expect(getModel("antigravity-claude-opus-4-6-thinking").variants).toEqual({
      low: { thinkingConfig: { thinkingBudget: 8192 } },
      max: { thinkingConfig: { thinkingBudget: 32768 } },
    });
+
+   expect(getModel("antigravity-claude-sonnet-4-6-thinking").variants).toEqual({
+     low: { thinkingConfig: { thinkingBudget: 8192 } },
+     max: { thinkingConfig: { thinkingBudget: 32768 } },
+   });
  });
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/plugin/config/models.test.ts` around lines 52 - 57, Add an assertion for
the new Sonnet thinking model so its variants are directly validated: update the
"defines thinking budget variants for Claude thinking models" test (which calls
getModel) to also expect
getModel("antigravity-claude-sonnet-4-6-thinking").variants toEqual the same
shape as the Opus one ({ low: { thinkingConfig: { thinkingBudget: 8192 } }, max:
{ thinkingConfig: { thinkingBudget: 32768 } } }); this ensures both
antigravity-claude-opus-4-6-thinking and antigravity-claude-sonnet-4-6-thinking
are explicitly checked.
src/plugin/transform/model-resolver.test.ts (1)

121-137: Add test coverage for Sonnet 4.6 Thinking alias variants and tier-suffixed backward compatibility.

The new gemini-claude-sonnet-4-6-thinking-low/medium/high → claude-sonnet-4-6-thinking aliases in model-resolver.ts (lines 55–57) are untested. Additionally, the backward-compatibility suite covers claude-opus-4-6-thinking-low/medium/high but lacks the equivalent Sonnet tests.

Add tests mirroring the existing Opus coverage:

🛠️ Suggested additions

In the "Claude Sonnet 4.6 (non-thinking)" describe block (around line 157–162):

+   it("gemini-claude-sonnet-4-6-thinking-low alias resolves to claude-sonnet-4-6-thinking with low budget", () => {
+     const result = resolveModelWithTier("gemini-claude-sonnet-4-6-thinking-low");
+     expect(result.actualModel).toBe("claude-sonnet-4-6-thinking");
+     expect(result.thinkingBudget).toBe(8192);
+   });

In the "backward compatibility" describe block (after line 263):

+   it("claude-sonnet-4-6-thinking tier-suffixed models work without variant config", () => {
+     const lowResult = resolveModelWithVariant("claude-sonnet-4-6-thinking-low");
+     expect(lowResult.thinkingBudget).toBe(8192);
+
+     const highResult = resolveModelWithVariant("claude-sonnet-4-6-thinking-high");
+     expect(highResult.thinkingBudget).toBe(32768);
+   });
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/plugin/transform/model-resolver.test.ts` around lines 121 - 137, Add test
cases to cover the new Sonnet 4.6 thinking aliases: ensure
resolveModelWithTier("antigravity-claude-sonnet-4-6-thinking") and the
tier-suffixed aliases ("gemini-claude-sonnet-4-6-thinking-low/medium/high") map
to actualModel "claude-sonnet-4-6-thinking", have thinkingBudget 32768,
isThinkingModel true, and quotaPreference "antigravity". Mirror the existing
Opus tests: add the non-thinking Sonnet test into the "Claude Sonnet 4.6
(non-thinking)" describe block and add the tier-suffixed backward-compatibility
tests into the "backward compatibility" describe block so resolveModelWithTier
and the new aliases in model-resolver.ts are exercised.
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between efafbb9 and 55dd862.

📒 Files selected for processing (10)
  • README.md
  • docs/ANTIGRAVITY_API_SPEC.md
  • docs/MODEL-VARIANTS.md
  • src/plugin/config/models.test.ts
  • src/plugin/config/models.ts
  • src/plugin/transform/claude.test.ts
  • src/plugin/transform/cross-model-sanitizer.test.ts
  • src/plugin/transform/gemini.test.ts
  • src/plugin/transform/model-resolver.test.ts
  • src/plugin/transform/model-resolver.ts
🧰 Additional context used
🧬 Code graph analysis (4)
src/plugin/transform/cross-model-sanitizer.test.ts (3)
src/plugin/transform/model-resolver.ts (1)
  • getModelFamily (275-284)
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/claude.test.ts (2)
src/plugin/transform/index.ts (1)
  • isClaudeThinkingModel (35-35)
src/plugin/transform/claude.ts (1)
  • isClaudeThinkingModel (34-37)
src/plugin/transform/model-resolver.test.ts (2)
src/plugin/transform/model-resolver.ts (1)
  • resolveModelWithTier (163-270)
src/plugin/transform/index.ts (1)
  • resolveModelWithTier (22-22)
src/plugin/transform/gemini.test.ts (2)
src/plugin/transform/index.ts (1)
  • isImageGenerationModel (52-52)
src/plugin/transform/gemini.ts (1)
  • isImageGenerationModel (152-158)
🔇 Additional comments (7)
src/plugin/transform/model-resolver.ts (1)

55-57: LGTM — alias mappings follow the existing Opus pattern exactly.

All three tier variants (low, medium, high) correctly resolve to "claude-sonnet-4-6-thinking", and the tier suffix feeds into THINKING_TIER_BUDGETS.claude (8192 / 16384 / 32768) through the existing resolution path.

src/plugin/config/models.ts (1)

75-83: LGTM — model definition mirrors the Opus entry structure.

Context/output limits, modalities, and variant budgets (low: 8192, max: 32768) are consistent with both the Antigravity API spec and the Opus model. The maxOutputTokens ceiling (64000) stays above the max thinking budget (32768), satisfying the API constraint.

README.md (1)

198-206: LGTM — config example correctly lists "low" and "max".

src/plugin/transform/cross-model-sanitizer.test.ts (1)

16-16: LGTM — assertion is consistent with the isClaudeModel implementation.

src/plugin/transform/claude.test.ts (1)

63-63: LGTM — mirrors the existing 4.5 assertion and correctly validates the new model name.

docs/MODEL-VARIANTS.md (1)

111-119: LGTM — example JSON is correct and matches the models.ts definition.

src/plugin/config/models.test.ts (1)

20-20: LGTM — alphabetical placement is correct.

"antigravity-claude-sonnet-4-6-thinking" sits correctly between "antigravity-claude-sonnet-4-6" (shorter string sorts first) and "antigravity-gemini-3-flash" (c < g).

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/ANTIGRAVITY_API_SPEC.md`:
- Line 82: The table row for the new model `claude-sonnet-4-6-thinking` was
added but the Changelog was not updated; add a new Changelog entry dated today
under the "Changelog" section noting the addition of the
`claude-sonnet-4-6-thinking` model (include version or release note text
consistent with existing entries), mirror the format used by existing changelog
lines, and ensure the entry references the new model ID exactly so the docs
remain consistent.

In `@README.md`:
- Line 124: Update the README table entry for the model named
"antigravity-claude-sonnet-4-6-thinking" so its Variant column matches the
actual configured variants (`low` and `max`) defined in models.ts (see the
variant definitions around the symbols that map the model's thinking budgets at
lines referenced as variants in models.ts). Replace "low, medium, high" with
"low, max" in that table row so CLI users who pass --variant get the correct
documented options.

In `@src/plugin/transform/model-resolver.test.ts`:
- Around line 130-136: The test and resolver are still asserting the deprecated
`thinkingBudget` (budget_tokens) behavior for Sonnet/Opus 4.6; update the
resolver `resolveModelWithTier` and the corresponding test
(`antigravity-claude-sonnet-4-6-thinking` case in model-resolver.test.ts) to
return the new adaptive thinking representation and output effort instead of a
numeric thinkingBudget — i.e., produce something like a `thinking` object with
`type: "adaptive"` and an `output_config.effort` value (e.g., "high") and update
assertions to check for those fields (`result.thinking.type`,
`result.output_config.effort`, and keep
actualModel/isThinkingModel/quotaPreference checks), and open a follow-up issue
to remove `thinkingBudget` usages across the codebase once Anthropic fully
deprecates budget_tokens.

---

Nitpick comments:
In `@docs/MODEL-VARIANTS.md`:
- Around line 163-172: Update the "Tier-suffixed model names" list to include
the Sonnet 4.6 Thinking variants that the resolver supports: add entries for
antigravity-claude-sonnet-4-6-thinking-low,
antigravity-claude-sonnet-4-6-thinking-medium, and
antigravity-claude-sonnet-4-6-thinking-high (matching the same path as the Opus
variants) so users relying on tier-suffixed strings see they are accepted.

In `@src/plugin/config/models.test.ts`:
- Around line 52-57: Add an assertion for the new Sonnet thinking model so its
variants are directly validated: update the "defines thinking budget variants
for Claude thinking models" test (which calls getModel) to also expect
getModel("antigravity-claude-sonnet-4-6-thinking").variants toEqual the same
shape as the Opus one ({ low: { thinkingConfig: { thinkingBudget: 8192 } }, max:
{ thinkingConfig: { thinkingBudget: 32768 } } }); this ensures both
antigravity-claude-opus-4-6-thinking and antigravity-claude-sonnet-4-6-thinking
are explicitly checked.

In `@src/plugin/transform/gemini.test.ts`:
- Around line 615-618: Test title says "thinking variants" (plural) but only
asserts one variant; update the spec in src/plugin/transform/gemini.test.ts for
the isImageGenerationModel checks: either change the it(...) title to singular
("thinking variant") or add an additional assertion such as
expect(isImageGenerationModel("claude-sonnet-4-6-thinking-low")).toBe(false) so
the title and assertions match; reference the isImageGenerationModel calls in
the failing test block and adjust accordingly.

In `@src/plugin/transform/model-resolver.test.ts`:
- Around line 121-137: Add test cases to cover the new Sonnet 4.6 thinking
aliases: ensure resolveModelWithTier("antigravity-claude-sonnet-4-6-thinking")
and the tier-suffixed aliases
("gemini-claude-sonnet-4-6-thinking-low/medium/high") map to actualModel
"claude-sonnet-4-6-thinking", have thinkingBudget 32768, isThinkingModel true,
and quotaPreference "antigravity". Mirror the existing Opus tests: add the
non-thinking Sonnet test into the "Claude Sonnet 4.6 (non-thinking)" describe
block and add the tier-suffixed backward-compatibility tests into the "backward
compatibility" describe block so resolveModelWithTier and the new aliases in
model-resolver.ts are exercised.

| Model Name | Model ID | Type | Status |
|------------|----------|------|--------|
| Claude Sonnet 4.6 | `claude-sonnet-4-6` | Anthropic | ✅ Verified |
| Claude Sonnet 4.6 Thinking | `claude-sonnet-4-6-thinking` | Anthropic | ⏳ Pending Rollout |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

LGTM — model row is consistent with existing table format.

The new entry correctly uses the API model ID claude-sonnet-4-6-thinking, matching the convention for other Claude rows.

Note: the Changelog section (lines 634-635) was not updated to record this addition. Consider adding an entry dated today.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/ANTIGRAVITY_API_SPEC.md` at line 82, The table row for the new model
`claude-sonnet-4-6-thinking` was added but the Changelog was not updated; add a
new Changelog entry dated today under the "Changelog" section noting the
addition of the `claude-sonnet-4-6-thinking` model (include version or release
note text consistent with existing entries), mirror the format used by existing
changelog lines, and ensure the entry references the new model ID exactly so the
docs remain consistent.

Comment thread README.md
| `antigravity-gemini-3.1-pro` | low, high | Gemini 3.1 Pro with thinking (rollout-dependent) |
| `antigravity-gemini-3-flash` | minimal, low, medium, high | Gemini 3 Flash with thinking |
| `antigravity-claude-sonnet-4-6` | — | Claude Sonnet 4.6 |
| `antigravity-claude-sonnet-4-6-thinking` | low, medium, high | Claude Sonnet 4.6 with extended thinking |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Variant list is wrong — "low, medium, high" should be "low, max".

The model table documents variants that don't exist in the definition. The actual variants (lines 202–205 below and models.ts lines 80–81) are low and max. Users reading the table who try --variant=medium or --variant=high will receive no configured thinking budget, silently falling back to the model's default (32768). The Opus row on the very next line correctly shows "low, max".

📝 Proposed fix
-| `antigravity-claude-sonnet-4-6-thinking` | low, medium, high | Claude Sonnet 4.6 with extended thinking |
+| `antigravity-claude-sonnet-4-6-thinking` | low, max | Claude Sonnet 4.6 with extended thinking |
📝 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.

Suggested change
| `antigravity-claude-sonnet-4-6-thinking` | low, medium, high | Claude Sonnet 4.6 with extended thinking |
| `antigravity-claude-sonnet-4-6-thinking` | low, max | Claude Sonnet 4.6 with extended thinking |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` at line 124, Update the README table entry for the model named
"antigravity-claude-sonnet-4-6-thinking" so its Variant column matches the
actual configured variants (`low` and `max`) defined in models.ts (see the
variant definitions around the symbols that map the model's thinking budgets at
lines referenced as variants in models.ts). Replace "low, medium, high" with
"low, max" in that table row so CLI users who pass --variant get the correct
documented options.

Comment on lines +130 to +136
it("antigravity-claude-sonnet-4-6-thinking gets default max budget (32768)", () => {
const result = resolveModelWithTier("antigravity-claude-sonnet-4-6-thinking");
expect(result.actualModel).toBe("claude-sonnet-4-6-thinking");
expect(result.thinkingBudget).toBe(32768);
expect(result.isThinkingModel).toBe(true);
expect(result.quotaPreference).toBe("antigravity");
});
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

Anthropic Claude Sonnet 4.6 budget_tokens deprecated effort parameter thinking

💡 Result:

On Claude Sonnet 4.6 (claude-sonnet-4-6):

  • thinking: { type: "enabled", budget_tokens: N } is deprecated on Sonnet 4.6 (and Opus 4.6) and “will be removed in a future model release.” The recommended replacement is adaptive thinking + effort. [1]
  • Use adaptive thinking by setting: thinking: { type: "adaptive" }. [1]
  • Control how much thinking / overall token spend Claude uses with the effort parameter via output_config, e.g. low | medium | high (default). (max is Opus 4.6 only; using max on Sonnet 4.6 errors.) [1][2]
  • effort is not deprecated; it’s the recommended control on Sonnet 4.6/Opus 4.6 in place of budget_tokens. [2]

Example (Sonnet 4.6, recommended):

{
  "model": "claude-sonnet-4-6",
  "max_tokens": 16000,
  "thinking": { "type": "adaptive" },
  "output_config": { "effort": "medium" },
  "messages": [{ "role": "user", "content": "..." }]
}

[1][2]


Claude Sonnet 4.6 uses a deprecated thinking budget approach — track for migration to effort parameter.

Per Anthropic's official documentation, budget_tokens on Sonnet 4.6 (and Opus 4.6) is deprecated and will be removed in a future model release. The recommended replacement is adaptive thinking with the effort parameter (low | medium | high).

The test correctly validates the current code path, but the thinkingBudget approach it validates is deprecated. Before Anthropic removes the budget_tokens API, migrate to:

{ "thinking": { "type": "adaptive" }, "output_config": { "effort": "high" } }

Consider opening a follow-up issue to update the resolver and test to use the effort parameter approach instead.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/plugin/transform/model-resolver.test.ts` around lines 130 - 136, The test
and resolver are still asserting the deprecated `thinkingBudget` (budget_tokens)
behavior for Sonnet/Opus 4.6; update the resolver `resolveModelWithTier` and the
corresponding test (`antigravity-claude-sonnet-4-6-thinking` case in
model-resolver.test.ts) to return the new adaptive thinking representation and
output effort instead of a numeric thinkingBudget — i.e., produce something like
a `thinking` object with `type: "adaptive"` and an `output_config.effort` value
(e.g., "high") and update assertions to check for those fields
(`result.thinking.type`, `result.output_config.effort`, and keep
actualModel/isThinkingModel/quotaPreference checks), and open a follow-up issue
to remove `thinkingBudget` usages across the codebase once Anthropic fully
deprecates budget_tokens.

@ShivamB25
Copy link
Copy Markdown

hey @sk0x0y do you know why only low and max supported by google ? like we don't even see the option of that on anti gravity

NoeFabris added a commit that referenced this pull request Feb 23, 2026
…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
@NoeFabris
Copy link
Copy Markdown
Owner

superseeded in #503, thanks for the groundwork!

@NoeFabris NoeFabris closed this Feb 23, 2026
NoeFabris added a commit that referenced this pull request Feb 23, 2026
…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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Claude Sonnet 4.6 Thinking model support

3 participants