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

Function modelSupportsStructuredOutputs

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

Source from the content-addressed store, hash-verified

140
141// @[MODEL LAUNCH]: Add the new model ID to this list if it supports structured outputs.
142export function modelSupportsStructuredOutputs(model: string): boolean {
143 const canonical = getCanonicalName(model)
144 const provider = getAPIProvider()
145 // Structured outputs only supported on firstParty and Foundry (not Bedrock/Vertex yet)
146 if (provider !== 'firstParty' && provider !== 'foundry') {
147 return false
148 }
149 return (
150 canonical.includes('claude-sonnet-4-6') ||
151 canonical.includes('claude-sonnet-4-5') ||
152 canonical.includes('claude-opus-4-1') ||
153 canonical.includes('claude-opus-4-5') ||
154 canonical.includes('claude-opus-4-6') ||
155 canonical.includes('claude-haiku-4-5')
156 )
157}
158
159// @[MODEL LAUNCH]: Add the new model if it supports auto mode (specifically PI probes) — ask in #proj-claude-code-safety-research.
160export function modelSupportsAutoMode(model: string): boolean {

Callers 4

sideQueryFunction · 0.85
betas.tsFile · 0.85
toolToAPISchemaFunction · 0.85
paramsFromContextFunction · 0.85

Calls 2

getCanonicalNameFunction · 0.85
getAPIProviderFunction · 0.85

Tested by

no test coverage detected