(model: Model)
| 141 | models.openrouter_grok_4, |
| 142 | ] satisfies string[] as string[] |
| 143 | export function supportsCacheControl(model: Model): boolean { |
| 144 | if (model.startsWith('openai/')) { |
| 145 | return true |
| 146 | } |
| 147 | if (model.startsWith('anthropic/')) { |
| 148 | return true |
| 149 | } |
| 150 | if (!isExplicitlyDefinedModel(model)) { |
| 151 | // Default to no cache control for unknown models |
| 152 | return false |
| 153 | } |
| 154 | return !nonCacheableModels.includes(model) |
| 155 | } |
| 156 | |
| 157 | export function getModelFromShortName( |
| 158 | modelName: string | undefined, |
no test coverage detected