Skip to content

Commit cab797f

Browse files
committed
fix caching
1 parent 79aff25 commit cab797f

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

common/src/constants.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -288,15 +288,12 @@ export const providerModelNames = {
288288

289289
export type Model = (typeof models)[keyof typeof models] | (string & {})
290290

291-
const modelsGeneric = models satisfies Record<string, string> as Record<
292-
string,
293-
string | undefined
294-
>
291+
const modelsGeneric = Object.values(models) as string[]
295292
const nonCacheableModels = [
296293
models.openrouter_grok_4,
297294
] satisfies string[] as string[]
298295
export function supportsCacheControl(model: Model): boolean {
299-
if (modelsGeneric[model] === undefined) {
296+
if (!modelsGeneric.includes(model satisfies string as string)) {
300297
// Default to no cache control for unknown models
301298
return false
302299
}

0 commit comments

Comments
 (0)