We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 79aff25 commit cab797fCopy full SHA for cab797f
common/src/constants.ts
@@ -288,15 +288,12 @@ export const providerModelNames = {
288
289
export type Model = (typeof models)[keyof typeof models] | (string & {})
290
291
-const modelsGeneric = models satisfies Record<string, string> as Record<
292
- string,
293
- string | undefined
294
->
+const modelsGeneric = Object.values(models) as string[]
295
const nonCacheableModels = [
296
models.openrouter_grok_4,
297
] satisfies string[] as string[]
298
export function supportsCacheControl(model: Model): boolean {
299
- if (modelsGeneric[model] === undefined) {
+ if (!modelsGeneric.includes(model satisfies string as string)) {
300
// Default to no cache control for unknown models
301
return false
302
}
0 commit comments