Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

Summary

The effort parameter is a new feature specific to Claude Opus 4.5 for controlling how much computational work the model applies to each task. Other Anthropic models (Sonnet 4.5, Haiku 4.5, Opus 4.1, etc.) must continue to use the thinking.budgetTokens approach for extended thinking.

Changes

  • Add ANTHROPIC_EFFORT mapping to thinking.ts for Opus 4.5's effort levels
  • Update buildProviderOptions to detect Opus 4.5 and use the effort parameter
  • Update calculateEffectiveMaxOutputTokens to skip budget adjustment for Opus 4.5 (effort-based models don't need this)
  • Add unit tests for provider options builder covering both Opus 4.5 (effort) and other models (thinking.budgetTokens)
  • Add integration tests (sendMessage.reasoning.test.ts) for reasoning with both Sonnet 4.5 and Opus 4.5

Testing

  • Unit tests pass: bun test src/common/utils/ai/providerOptions.test.ts
  • All existing tests pass: make test (1199 pass)
  • Integration tests added for regression prevention (run with TEST_INTEGRATION=1)

Generated with mux

@ammar-agent ammar-agent force-pushed the effort-param-opus-only branch 3 times, most recently from ef19eb1 to 8ce486c Compare November 25, 2025 01:26
The effort parameter is a new feature specific to Claude Opus 4.5.
Other Anthropic models (Sonnet 4.5, Haiku 4.5, Opus 4.1, etc.) must use
the thinking.budgetTokens approach for extended thinking.

Changes:
- Re-add ANTHROPIC_THINKING_BUDGETS for non-Opus 4.5 models
- Update buildProviderOptions to detect Opus 4.5 and use effort param
- Non-Opus 4.5 models use thinking.budgetTokens instead
- Add unit tests for provider options builder
- Add integration tests for reasoning with both Sonnet 4.5 and Opus 4.5

_Generated with `mux`_
@ammar-agent ammar-agent force-pushed the effort-param-opus-only branch from 8ce486c to bea9238 Compare November 25, 2025 01:26
@ammario ammario merged commit c5475e1 into main Nov 25, 2025
13 checks passed
@ammario ammario deleted the effort-param-opus-only branch November 25, 2025 02:00
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.

2 participants