MCPcopy
hub / github.com/codeaashu/claude-code / modelSupportsContextManagement

Function modelSupportsContextManagement

src/utils/betas.ts:125–139  ·  view source on GitHub ↗
(model: string)

Source from the content-addressed store, hash-verified

123
124// Context management is supported on Claude 4+ models
125export function modelSupportsContextManagement(model: string): boolean {
126 const canonical = getCanonicalName(model)
127 const provider = getAPIProvider()
128 if (provider === 'foundry') {
129 return true
130 }
131 if (provider === 'firstParty') {
132 return !canonical.includes('claude-3-')
133 }
134 return (
135 canonical.includes('claude-opus-4') ||
136 canonical.includes('claude-sonnet-4') ||
137 canonical.includes('claude-haiku-4')
138 )
139}
140
141// @[MODEL LAUNCH]: Add the new model ID to this list if it supports structured outputs.
142export function modelSupportsStructuredOutputs(model: string): boolean {

Callers 1

betas.tsFile · 0.85

Calls 2

getCanonicalNameFunction · 0.85
getAPIProviderFunction · 0.85

Tested by

no test coverage detected