MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / supportsCacheControl

Function supportsCacheControl

common/src/constants/model-config.ts:143–155  ·  view source on GitHub ↗
(model: Model)

Source from the content-addressed store, hash-verified

141 models.openrouter_grok_4,
142] satisfies string[] as string[]
143export 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
157export function getModelFromShortName(
158 modelName: string | undefined,

Callers 1

runAgentStepFunction · 0.85

Calls 1

isExplicitlyDefinedModelFunction · 0.90

Tested by

no test coverage detected