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

Function modelSupportsThinking

src/utils/thinking.ts:90–110  ·  view source on GitHub ↗
(model: string)

Source from the content-addressed store, hash-verified

88// TODO(inigo): add support for probing unknown models via API error detection
89// Provider-aware thinking support detection (aligns with modelSupportsISP in betas.ts)
90export function modelSupportsThinking(model: string): boolean {
91 const supported3P = get3PModelCapabilityOverride(model, 'thinking')
92 if (supported3P !== undefined) {
93 return supported3P
94 }
95 if (process.env.USER_TYPE === 'ant') {
96 if (resolveAntModel(model.toLowerCase())) {
97 return true
98 }
99 }
100 // IMPORTANT: Do not change thinking support without notifying the model
101 // launch DRI and research. This can greatly affect model quality and bashing.
102 const canonical = getCanonicalName(model)
103 const provider = getAPIProvider()
104 // 1P and Foundry: all Claude 4+ models (including Haiku 4.5)
105 if (provider === 'foundry' || provider === 'firstParty') {
106 return !canonical.includes('claude-3-')
107 }
108 // 3P (Bedrock/Vertex): only Opus 4+ and Sonnet 4+
109 return canonical.includes('sonnet-4') || canonical.includes('opus-4')
110}
111
112// @[MODEL LAUNCH]: Add the new model to the allowlist if it supports adaptive thinking.
113export function modelSupportsAdaptiveThinking(model: string): boolean {

Callers 1

paramsFromContextFunction · 0.85

Calls 3

resolveAntModelFunction · 0.85
getCanonicalNameFunction · 0.85
getAPIProviderFunction · 0.85

Tested by

no test coverage detected