Add Opus 4.6, Opus 4.5, Sonnet 4.6, Haiku 4.5, remove Haiku3.5#2
Add Opus 4.6, Opus 4.5, Sonnet 4.6, Haiku 4.5, remove Haiku3.5#2Acksell wants to merge 2 commits intoInstawork:mainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdded 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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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 Tip CodeRabbit can enforce grammar and style rules using `languagetool`.Configure the |
There was a problem hiding this comment.
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 | 🟠 MajorMissing loop variable capture causes potential test flakiness.
The loop variable
modelis not captured before being used in subtests. This is inconsistent with thescenario := scenariocapture at line 128 in the same file, and with the pattern ininternal/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 | 🟡 MinorUpdate hardcoded model reference in test to match configuration.
The test
internal/providers/anthropic_test.gohardcodes references to"claude-3-5-haiku-20241022"(lines 84, 118-119), but this model is not present inconfigs/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
📒 Files selected for processing (2)
configs/base.ymlinternal/providers/anthropic_integration_test.go
|
Can't assign you @emhagman, but ping! |
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
Updates