Skip to content

Commit b46d1da

Browse files
committed
fix: enable caching for Opus 4.5 model
Added claude-opus-4-5-20251101 to the cache control switch statements to enable prompt caching, matching the behavior of other Claude models. Fixes #9567
1 parent 8949c2f commit b46d1da

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/api/providers/anthropic.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export class AnthropicHandler extends BaseProvider implements SingleCompletionHa
5656
switch (modelId) {
5757
case "claude-sonnet-4-5":
5858
case "claude-sonnet-4-20250514":
59+
case "claude-opus-4-5-20251101":
5960
case "claude-opus-4-1-20250805":
6061
case "claude-opus-4-20250514":
6162
case "claude-3-7-sonnet-20250219":
@@ -117,6 +118,7 @@ export class AnthropicHandler extends BaseProvider implements SingleCompletionHa
117118
switch (modelId) {
118119
case "claude-sonnet-4-5":
119120
case "claude-sonnet-4-20250514":
121+
case "claude-opus-4-5-20251101":
120122
case "claude-opus-4-1-20250805":
121123
case "claude-opus-4-20250514":
122124
case "claude-3-7-sonnet-20250219":

0 commit comments

Comments
 (0)