Commit f8e7690
authored
🤖 fix: update Claude Opus 4.5 thinking policy to match API (#752)
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>1 parent f99f4a5 commit f8e7690
File tree
3 files changed
+92
-6
lines changed- src/browser
- components
- utils/thinking
3 files changed
+92
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
49 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
50 | 59 | | |
51 | 60 | | |
52 | 61 | | |
53 | 62 | | |
54 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
55 | 71 | | |
56 | 72 | | |
57 | 73 | | |
58 | 74 | | |
59 | 75 | | |
60 | 76 | | |
61 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
62 | 86 | | |
63 | 87 | | |
64 | 88 | | |
| |||
92 | 116 | | |
93 | 117 | | |
94 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
95 | 136 | | |
96 | 137 | | |
97 | 138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
36 | 53 | | |
37 | 54 | | |
38 | 55 | | |
| |||
46 | 63 | | |
47 | 64 | | |
48 | 65 | | |
49 | | - | |
50 | 66 | | |
51 | 67 | | |
52 | 68 | | |
| |||
78 | 94 | | |
79 | 95 | | |
80 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
81 | 113 | | |
82 | 114 | | |
83 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
40 | 48 | | |
41 | 49 | | |
42 | 50 | | |
| |||
51 | 59 | | |
52 | 60 | | |
53 | 61 | | |
54 | | - | |
55 | | - | |
| 62 | + | |
| 63 | + | |
56 | 64 | | |
57 | 65 | | |
58 | 66 | | |
| |||
64 | 72 | | |
65 | 73 | | |
66 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
67 | 80 | | |
68 | 81 | | |
69 | 82 | | |
0 commit comments