Commit 504c4b9
committed
refactor: reuse anthropicSupportsNativeXhigh in Anthropic fetch wrapper
Replace the duplicated Opus 4.7+ regex inside
wrapFetchWithAnthropicCacheControl with a call to the existing
anthropicSupportsNativeXhigh helper from src/common/types/thinking.ts.
The helper already performs the same regex check plus provider-prefix
normalization (e.g., anthropic/claude-opus-4-7 via the ai-model-id
gateway header), keeping the wire-level detection and the policy-level
detection in one place.1 parent 02764cf commit 504c4b9
1 file changed
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
327 | | - | |
328 | | - | |
329 | | - | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
330 | 331 | | |
331 | 332 | | |
332 | 333 | | |
| |||
0 commit comments