Skip to content

Commit bcfb2c1

Browse files
committed
add cache control for all anthropic and openai models
1 parent 9141fbe commit bcfb2c1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

common/src/old-constants.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,12 @@ const nonCacheableModels = [
314314
models.openrouter_grok_4,
315315
] satisfies string[] as string[]
316316
export function supportsCacheControl(model: Model): boolean {
317+
if (model.startsWith('openai/')) {
318+
return true
319+
}
320+
if (model.startsWith('anthropic/')) {
321+
return true
322+
}
317323
if (!isExplicitlyDefinedModel(model)) {
318324
// Default to no cache control for unknown models
319325
return false

0 commit comments

Comments
 (0)