Skip to content

Add Opus 4.6, Opus 4.5, Sonnet 4.6, Haiku 4.5, remove Haiku3.5#2

Open
Acksell wants to merge 2 commits intoInstawork:mainfrom
Acksell:ae/update-claude-models
Open

Add Opus 4.6, Opus 4.5, Sonnet 4.6, Haiku 4.5, remove Haiku3.5#2
Acksell wants to merge 2 commits intoInstawork:mainfrom
Acksell:ae/update-claude-models

Conversation

@Acksell
Copy link
Copy Markdown

@Acksell Acksell commented Mar 17, 2026

This fixes make test-anthropic, which was failing due to haiku 3.5 retirement.

Decided to add opus to the integration test too for better coverage. It's 3x cheaper now since this test was created, I think we can afford to run it :) rather that than failures going unnoticed.

Summary by CodeRabbit

  • New Features

    • Added Claude Opus 4-6, Claude Opus 4-5, and Claude Sonnet 4-6 models with complete configuration including usage limits and pricing.
  • Updates

    • Replaced Claude 3.5 Haiku with Claude Haiku 4-5, featuring updated pricing and new model aliases for improved accessibility.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 17, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9e86219f-66b5-4207-822c-4e2fa16196a0

📥 Commits

Reviewing files that changed from the base of the PR and between 258397f and 14b50b3.

📒 Files selected for processing (2)
  • configs/base.yml
  • internal/providers/anthropic_integration_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • internal/providers/anthropic_integration_test.go

📝 Walkthrough

Walkthrough

Added three new Anthropic models (claude-opus-4-6, claude-opus-4-5, claude-sonnet-4-6) to provider configuration and replaced the claude-3-5-haiku entry with claude-haiku-4-5 (updated aliases, limits, and pricing). Corresponding integration tests were updated to reflect new model IDs and token settings.

Changes

Cohort / File(s) Summary
Anthropic Model Configuration
configs/base.yml
Added claude-opus-4-6, claude-opus-4-5, and claude-sonnet-4-6 models with enabled flags, aliases, limits (tokens_per_minute/day, burst), and pricing. Replaced claude-3-5-haiku with claude-haiku-4-5, updated aliases to claude-haiku-4.5 and claude-haiku-4-5-20251001, adjusted limits and raised pricing (input: 1.00, output: 5.00).
Integration Test Updates
internal/providers/anthropic_integration_test.go
Renamed/added test model entries to use claude-opus-4-6, claude-opus-4-5, and claude-sonnet-4-6/claude-haiku-4-5; increased maxTokens for the sonnet entry and modified the test prompts. Removed the explicit loop variable capture before creating subtests (subtests now close over loop variable directly).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: adding three new Opus/Sonnet models and updating Haiku while removing the deprecated version.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Tip

CodeRabbit can enforce grammar and style rules using `languagetool`.

Configure the reviews.tools.languagetool setting to enable/disable rules and categories. Refer to the LanguageTool Community to learn more.

Copy link
Copy Markdown

@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: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
internal/providers/anthropic_integration_test.go (1)

59-70: ⚠️ Potential issue | 🟠 Major

Missing loop variable capture causes potential test flakiness.

The loop variable model is not captured before being used in subtests. This is inconsistent with the scenario := scenario capture at line 128 in the same file, and with the pattern in internal/providers/openai_integration_test.go:69. While Go 1.22+ changed loop variable semantics, this should be explicit for clarity and consistency.

🐛 Proposed fix
 	// Run model tests in parallel
 	for _, model := range anthropicTestModels {
+		model := model // capture range variable
+
 		t.Run(model.name, func(t *testing.T) {
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@internal/providers/anthropic_integration_test.go` around lines 59 - 70, The
loop over anthropicTestModels does not capture the loop variable before
launching subtests, which can cause flakiness; inside the for _, model := range
anthropicTestModels loop (the block that calls t.Run(model.name,...)), add an
explicit capture like model := model immediately before the nested t.Run calls
so testAnthropicNonStreaming and testAnthropicStreaming receive the correct
model instance during each subtest.
configs/base.yml (1)

412-428: ⚠️ Potential issue | 🟡 Minor

Update hardcoded model reference in test to match configuration.

The test internal/providers/anthropic_test.go hardcodes references to "claude-3-5-haiku-20241022" (lines 84, 118-119), but this model is not present in configs/base.yml. The config contains "claude-3-haiku-20240307" instead. Update the test to reference a model that exists in the configuration to prevent assertion failures.

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

In `@configs/base.yml` around lines 412 - 428, The test strings hardcode a
nonexistent model name ("claude-3-5-haiku-20241022") causing assertions to fail;
update the occurrences in internal/providers/anthropic_test.go (the test that
references that model around the model lookup/assertions) to use the configured
model name "claude-3-haiku-20240307" (replace the string at the three
occurrences) so the test matches configs/base.yml; ensure all assertions and
setup that reference the old model string are updated to the new string.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@configs/base.yml`:
- Around line 412-418: The test fails because the alias list for the
"claude-4-5-haiku" model lacks the exact string "claude-haiku-4-5" used by
internal/providers/anthropic_integration_test.go:36; update the aliases array
for the "claude-4-5-haiku" entry in configs/base.yml to include
"claude-haiku-4-5" so the exact-match lookup in internal/config/config.go:650
will find the configured model.

---

Outside diff comments:
In `@configs/base.yml`:
- Around line 412-428: The test strings hardcode a nonexistent model name
("claude-3-5-haiku-20241022") causing assertions to fail; update the occurrences
in internal/providers/anthropic_test.go (the test that references that model
around the model lookup/assertions) to use the configured model name
"claude-3-haiku-20240307" (replace the string at the three occurrences) so the
test matches configs/base.yml; ensure all assertions and setup that reference
the old model string are updated to the new string.

In `@internal/providers/anthropic_integration_test.go`:
- Around line 59-70: The loop over anthropicTestModels does not capture the loop
variable before launching subtests, which can cause flakiness; inside the for _,
model := range anthropicTestModels loop (the block that calls
t.Run(model.name,...)), add an explicit capture like model := model immediately
before the nested t.Run calls so testAnthropicNonStreaming and
testAnthropicStreaming receive the correct model instance during each subtest.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4933c1df-606f-4375-9362-a8ea145c9793

📥 Commits

Reviewing files that changed from the base of the PR and between f2015c7 and 258397f.

📒 Files selected for processing (2)
  • configs/base.yml
  • internal/providers/anthropic_integration_test.go

Comment thread configs/base.yml Outdated
@Acksell
Copy link
Copy Markdown
Author

Acksell commented Mar 17, 2026

Can't assign you @emhagman, but ping!

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.

1 participant