Conversation
…h new error message The production error message was expanded when Sonnet 4.6 was also added as a supported model for effort='max'. The test's match regex still referenced the old "Claude Opus 4.6"-only message; update it to match the new "Claude 4.6 models" wording. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Greptile SummaryTest-only fix: updates the
Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| tests/test_litellm/llms/anthropic/chat/test_anthropic_chat_transformation.py | Updated pytest.raises match regex in test_max_effort_rejected_for_opus_45 to align with the expanded error message in transformation.py:1374. The new regex correctly matches the current production error message. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["transform_request called with<br/>model=claude-opus-4-5, effort='max'"] --> B{"Is effort == 'max'?"}
B -->|Yes| C{"_is_claude_4_6_model(model)?"}
C -->|No| D["Raise ValueError:<br/>effort='max' is only supported by<br/>Claude 4.6 models (Opus 4.6, Sonnet 4.6)"]
C -->|Yes| E["Set output_config in request data"]
B -->|No| E
D --> F["pytest.raises catches ValueError"]
F --> G["match regex validates error message:<br/>'effort=max is only supported by Claude 4.6 models'"]
Last reviewed commit: 963e0ea
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
test_max_effort_rejected_for_opus_45was failing because the production error message was expanded when Sonnet 4.6 was added as a supported model foreffort='max'"effort='max' is only supported by Claude Opus 4.6""effort='max' is only supported by Claude 4.6 models (Opus 4.6, Sonnet 4.6). Got model: ..."match=regex to"effort='max' is only supported by Claude 4.6 models"which matches the current messageNot related to PR #21664 (which only touches pricing JSON files).
Test plan
test_max_effort_rejected_for_opus_45passes locally after fix🤖 Generated with Claude Code