Commit c5f7292
fix(server): restore claude effort remapping and exclude perf tests from default scope (#5)
Cherry-pick drift from d81e41c: ClaudeAdapter never remapped unsupported
or prompt-injected effort levels to a model-supported tier. For Claude
Sonnet 4.6 a request for "max" or "ultrathink" silently fell back to the
model default ("medium") instead of capping to the highest supported
non-prompt-injected level ("high"); ultrathink also lost its
"Ultrathink:\n" prompt prefix path because callers saw `null` effort.
Replace the post-resolveEffort `getEffectiveClaudeCodeEffort` helper with
a caps-aware version that:
- passes supported, non-prompt-injected efforts through unchanged
- falls back to the model default when no effort is requested
- caps unsupported or prompt-injected efforts ("max", "ultrathink") to
the highest supported non-prompt-injected level
The existing prompt-prefix path in `buildPromptText` already handles the
"Ultrathink:\n" injection from the raw effort, so it now works end-to-end
once the effort assertion stops short-circuiting the test.
Also exclude `integration/perf/**` from the default `bun run test`
scope. The perf benchmarks run ~90s each and fail deterministically on
shared CI hardware; opt back in via `bun run test:perf`
(VITEST_PERF=1) which targets the folder explicitly.
Co-authored-by: Claude <noreply@anthropic.com>1 parent f5df2ff commit c5f7292
3 files changed
Lines changed: 38 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
50 | | - | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
| 225 | + | |
| 226 | + | |
226 | 227 | | |
227 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
228 | 249 | | |
229 | 250 | | |
230 | | - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
231 | 255 | | |
232 | 256 | | |
233 | 257 | | |
| |||
2927 | 2951 | | |
2928 | 2952 | | |
2929 | 2953 | | |
2930 | | - | |
2931 | | - | |
2932 | 2954 | | |
2933 | 2955 | | |
2934 | 2956 | | |
2935 | 2957 | | |
2936 | 2958 | | |
2937 | | - | |
| 2959 | + | |
2938 | 2960 | | |
2939 | 2961 | | |
2940 | 2962 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
5 | 9 | | |
6 | 10 | | |
7 | 11 | | |
| |||
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
16 | 23 | | |
17 | 24 | | |
18 | 25 | | |
0 commit comments