Skip to content

Conversation

@ThomasK33
Copy link
Member

Claude Opus 4.5 uses the effort parameter which only supports low, medium, and high (no 'off' option). This PR updates the thinking policy to reflect the API's capabilities.

Changes

  • Policy Update: Return ['low', 'medium', 'high'] for opus-4-5 models (no 'off')
  • Fallback Logic: When 'off' is requested, fallback to 'high' for best reasoning experience
  • Test Coverage: Added comprehensive tests for Opus 4.5 policy (15 tests pass)
  • Storybook: Added Opus45ThreeLevels story showcasing the 3-position slider

Impact

Before After
4-position slider (off/low/medium/high) 3-position slider (low/medium/high)
Could select 'off' (invalid for API) Cannot select 'off' (matches API)
Invalid UI state possible UI always matches API capabilities

Testing

  • ✅ All 419 browser utils tests pass
  • ✅ All 15 policy tests pass
  • ✅ TypeScript typecheck passes
  • ✅ Opus 4.5 fallback to 'high' works correctly

This aligns Opus 4.5 with how Gemini 3 is handled (which has 2 levels: low/high).

Generated with mux

Claude Opus 4.5 uses the effort parameter which only supports low/medium/high
(no 'off' option). Update thinking policy to reflect this:

- Return ['low', 'medium', 'high'] for opus-4-5 models
- Fallback to 'high' (instead of 'medium') when 'off' is requested
- Add comprehensive test coverage for Opus 4.5 policy
- Add Storybook story showcasing 3-position slider

This aligns the UI with the Anthropic API's capabilities, similar to how
Gemini 3 is handled with ['low', 'high'].

Fixes the issue where users could select 'off' for Opus 4.5, which would
result in no effort parameter being sent to the API.

_Generated with `mux`_

Change-Id: If402fe10a6061ce21dac4eb23a29ca58a9ca3613
Signed-off-by: Thomas Kosiewski <tk@coder.com>
Change-Id: Idfbb6de0240ee4a3f82835bb3cc68469b1eeb7c0
Signed-off-by: Thomas Kosiewski <tk@coder.com>
The play function was causing test failures. The story is primarily
for visual documentation of the 3-position slider, so the play function
isn't necessary.

Change-Id: I1b0123cecf1b1bba65abd759fd68bd63333ee2d3
Signed-off-by: Thomas Kosiewski <tk@coder.com>
The InteractiveDemo play test was failing because it shared persisted
state with other stories (via the shared 'storybook-demo' workspaceId).
When DifferentModels runs first and sets thinking to 'medium' for Opus 4.5,
the InteractiveDemo story inherits that state.

Fix by giving InteractiveDemo its own unique workspaceId to ensure
test isolation.

Change-Id: I31bc0c6a2fc21a9a0084b966ce047422ce91339d
Signed-off-by: Thomas Kosiewski <tk@coder.com>
@ThomasK33 ThomasK33 added this pull request to the merge queue Nov 25, 2025
Merged via the queue into main with commit f8e7690 Nov 25, 2025
13 checks passed
@ThomasK33 ThomasK33 deleted the opus-reasoning-levels-update branch November 25, 2025 11:56
ThomasK33 added a commit that referenced this pull request Nov 25, 2025
Claude Opus 4.5 uses the effort parameter which only supports `low`,
`medium`, and `high` (no 'off' option). This PR updates the thinking
policy to reflect the API's capabilities.

## Changes

- **Policy Update**: Return `['low', 'medium', 'high']` for `opus-4-5`
models (no 'off')
- **Fallback Logic**: When 'off' is requested, fallback to 'high' for
best reasoning experience
- **Test Coverage**: Added comprehensive tests for Opus 4.5 policy (15
tests pass)
- **Storybook**: Added `Opus45ThreeLevels` story showcasing the
3-position slider

## Impact

| Before | After |
|--------|-------|
| 4-position slider (off/low/medium/high) | 3-position slider
(low/medium/high) |
| Could select 'off' (invalid for API) | Cannot select 'off' (matches
API) |
| Invalid UI state possible | UI always matches API capabilities |

## Testing

- ✅ All 419 browser utils tests pass
- ✅ All 15 policy tests pass
- ✅ TypeScript typecheck passes
- ✅ Opus 4.5 fallback to 'high' works correctly

This aligns Opus 4.5 with how Gemini 3 is handled (which has 2 levels:
low/high).

_Generated with `mux`_

---------

Signed-off-by: Thomas Kosiewski <tk@coder.com>
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