Add prompt caching for Opus 4.1 (#5389)

* Add prompt caching for Opus 4.1

* Create forty-poets-doubt.md
This commit is contained in:
Saoud Rizwan authored and GitHub committed 2025-08-06 00:10:50 -07:00
1 parent c10f4e0a66
commit 3a0e6a471b
11 files changed
+41 -7

No files matched your search

@@ -49,7 +49,6 @@ export async function refreshOpenRouterModels(
switch (rawModel.id) {
case "anthropic/claude-sonnet-4":
case "anthropic/claude-opus-4":
case "anthropic/claude-3-7-sonnet":
case "anthropic/claude-3-7-sonnet:beta":
case "anthropic/claude-3.7-sonnet":
@@ -62,6 +61,12 @@ export async function refreshOpenRouterModels(
modelInfo.cacheWritesPrice = 3.75
modelInfo.cacheReadsPrice = 0.3
break
case "anthropic/claude-opus-4.1":
case "anthropic/claude-opus-4":
modelInfo.supportsPromptCache = true
modelInfo.cacheWritesPrice = 18.75
modelInfo.cacheReadsPrice = 1.5
break
case "anthropic/claude-3.5-sonnet-20240620":
case "anthropic/claude-3.5-sonnet-20240620:beta":
modelInfo.supportsPromptCache = true