MCPcopy Create free account
hub / github.com/Noumena-Network/code / modelSupportsThinking

Function modelSupportsThinking

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

Source from the content-addressed store, hash-verified

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

Callers 1

paramsFromContextFunction · 0.85

Calls 4

isInternalBuildFunction · 0.85
resolveAntModelFunction · 0.85
getCanonicalNameFunction · 0.85
getAPIProviderFunction · 0.85

Tested by

no test coverage detected