File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -299,6 +299,13 @@ export const providerModelNames = {
299299
300300export type Model = ( typeof models ) [ keyof typeof models ] | ( string & { } )
301301
302+ export const shouldCacheModels = [
303+ 'anthropic/claude-opus-4.1' ,
304+ 'anthropic/claude-sonnet-4' ,
305+ 'anthropic/claude-opus-4' ,
306+ 'anthropic/claude-3.7-sonnet' ,
307+ 'anthropic/claude-3.5-haiku' ,
308+ ]
302309const nonCacheableModels = [
303310 models . openrouter_grok_4 ,
304311] satisfies string [ ] as string [ ]
Original file line number Diff line number Diff line change @@ -8,8 +8,11 @@ function getExplicitlyDefinedModels(): Set<string> {
88 if ( explicitlyDefinedModels === null ) {
99 // Dynamically import to avoid circular dependency issues
1010 // eslint-disable-next-line @typescript-eslint/no-var-requires
11- const { models } = require ( '../old-constants' )
12- explicitlyDefinedModels = new Set ( Object . values ( models ) as string [ ] )
11+ const { models, shouldCacheModels } = require ( '../old-constants' )
12+ explicitlyDefinedModels = new Set ( [
13+ ...( Object . values ( models ) as string [ ] ) ,
14+ ...( Object . values ( shouldCacheModels ) as string [ ] ) ,
15+ ] )
1316 }
1417 return explicitlyDefinedModels
1518}
You can’t perform that action at this time.
0 commit comments