Skip to content

docs(anthropic): clarify the Opus 4.5 branch in adaptive-effort translation - #32876

Merged
akapur99 merged 1 commit into
litellm_internal_stagingfrom
litellm_opus_4_5_effort_comment
Jul 11, 2026
Merged

docs(anthropic): clarify the Opus 4.5 branch in adaptive-effort translation#32876
akapur99 merged 1 commit into
litellm_internal_stagingfrom
litellm_opus_4_5_effort_comment

Conversation

@akapur99

Copy link
Copy Markdown
Contributor

Relevant issues

Linear ticket

Pre-Submission checklist

  • I have added meaningful tests
  • My PR passes all CI/CD checks (e.g., lint, format, unit tests)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • I have received a Greptile Confidence Score of at least 4/5 before requesting a maintainer review

Screenshots / Proof of Fix

Comment-only change; no runtime behavior changes. Existing tests for the method are unaffected

Type

📖 Documentation

Changes

Follow-up to #32867. Adds an inline comment on the effort-capable non-adaptive branch of _translate_adaptive_effort_for_non_adaptive_model explaining that it exists specifically for models like Claude Opus 4.5 that natively accept output_config.effort but reject thinking:{type:adaptive}. The comment records why the adaptive block is dropped while the native effort is kept, and why effort-only requests pass through (so bedrock/vertex subclasses keep owning effort-level clamping) whereas an adaptive request with an unsupported effort level falls through to the legacy budget translation

No behavior change

@greptile-apps

greptile-apps Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a single inline comment to _translate_adaptive_effort_for_non_adaptive_model in the Anthropic messages transformation module, documenting why the effort-capable non-adaptive branch exists for models like Claude Opus 4.5.

  • Adds a 5-line comment above the if AnthropicConfig._model_supports_effort_param(model) branch explaining that Opus 4.5 accepts output_config.effort natively but rejects thinking:{type:adaptive}, so the adaptive block is dropped while native effort is kept.
  • No code logic, tests, or runtime behavior is modified.

Confidence Score: 5/5

Pure inline comment addition with zero runtime impact — safe to merge.

The change is a single inline code comment that records why a specific branch exists. No executable lines are touched, no tests are modified, and the comment accurately describes the branching logic already in place.

No files require special attention.

Important Files Changed

Filename Overview
litellm/llms/anthropic/experimental_pass_through/messages/transformation.py Comment-only change: adds an explanatory inline comment above the effort-capable non-adaptive branch in _translate_adaptive_effort_for_non_adaptive_model, clarifying the Opus 4.5 use-case. No runtime behavior changes.

Reviews (1): Last reviewed commit: "docs(anthropic): clarify the Opus 4.5 br..." | Re-trigger Greptile

@akapur99
akapur99 enabled auto-merge July 11, 2026 04:18
@akapur99
akapur99 requested a review from mateo-berri July 11, 2026 04:18
@codecov

codecov Bot commented Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@codspeed-hq

codspeed-hq Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing litellm_opus_4_5_effort_comment (a34f098) with litellm_internal_staging (ead7ad3)

Open in CodSpeed

…lation

Add an inline comment explaining that the effort-capable non-adaptive branch in
_translate_adaptive_effort_for_non_adaptive_model exists for models like Claude Opus
4.5 that accept output_config.effort but reject adaptive thinking, and why effort-only
requests pass through while adaptive requests with an unsupported effort level fall
through to the legacy translation.
@akapur99
akapur99 force-pushed the litellm_opus_4_5_effort_comment branch from 0ad512b to a34f098 Compare July 11, 2026 21:13
@akapur99
akapur99 merged commit 922e248 into litellm_internal_staging Jul 11, 2026
126 checks passed
@akapur99
akapur99 deleted the litellm_opus_4_5_effort_comment branch July 11, 2026 22:35
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.

3 participants