diff --git a/containers/api-proxy/management.js b/containers/api-proxy/management.js index afd27e3ac..dbd415824 100644 --- a/containers/api-proxy/management.js +++ b/containers/api-proxy/management.js @@ -23,6 +23,7 @@ const { } = require('./model-api-mapping'); const { isModelPermittedByPolicy } = require('./guards/model-policy-guard'); const { normalizeModel } = require('./routing-catalogue'); +const { getReasoningScope } = require('./model-reasoning'); const { getModelRoutingChoices } = require('./routing-candidates'); const { reflectScopedAuto } = require('./scoped-auto-model'); const { projectModelDecisionDiagnostics } = require('./model-decision-diagnostics'); @@ -43,7 +44,7 @@ function filterModelCatalogue(entries, provider, modelPolicy, getModel) { }); } -function buildRoutingModelMetadata(provider, modelIds, runtimeRecords) { +function buildRoutingModelMetadata(provider, modelIds, runtimeRecords, scope) { if (!Array.isArray(modelIds)) return null; const runtimeById = new Map( (Array.isArray(runtimeRecords) ? runtimeRecords : []) @@ -52,9 +53,12 @@ function buildRoutingModelMetadata(provider, modelIds, runtimeRecords) { ); return modelIds.map(id => { const runtime = runtimeById.get(id.toLowerCase()); - const maintained = lookupModelRoutingMetadata(id, provider); + const maintained = scope?.deployment === undefined && + (scope?.channel === undefined || scope.channel === 'native-api') + ? lookupModelRoutingMetadata(id, provider) + : null; const endpointMapping = lookupModelEndpoints(id, provider); - const normalized = normalizeModel(id, runtime, provider); + const normalized = normalizeModel(id, runtime, provider, scope); const efforts = Array.isArray(normalized.efforts) ? normalized.efforts : null; const endpoints = Array.isArray(runtime?.supportedEndpoints) ? runtime.supportedEndpoints @@ -182,6 +186,11 @@ function createManagementHandlers(deps) { const reflection = { endpoints: getAdapters().map(adapter => { const info = adapter.getReflectionInfo(); + const scope = getReasoningScope( + adapter.name, + adapter.getTargetHost?.(), + adapter.getTargetScheme?.(), + ); const providerModels = info.models_cache_key !== null ? (cachedModels[info.models_cache_key] || null) : null; @@ -221,6 +230,7 @@ function createManagementHandlers(deps) { adapter.name, models, privateRoutingModelMetadata, + scope, ), models_url: info.models_url, ...(info.credential_kind !== undefined && { credential_kind: info.credential_kind }), diff --git a/containers/api-proxy/management.test.js b/containers/api-proxy/management.test.js index eafc8d36e..39df19770 100644 --- a/containers/api-proxy/management.test.js +++ b/containers/api-proxy/management.test.js @@ -114,6 +114,38 @@ describe('routing metadata in /reflect', () => { }, ]); }); + + it('does not expose maintained reasoning or context metadata for a custom target', () => { + const adapter = { + name: 'openai', + getTargetHost: () => 'router.example.com', + getTargetScheme: () => 'https', + getReflectionInfo: () => ({ + provider: 'openai', port: 10000, configured: true, models_cache_key: 'openai', + }), + }; + const result = createManagementHandlers({ + getAdapters: () => [adapter], + getCachedModels: () => ({ openai: ['gpt-5.4-mini'] }), + getRuntimeModelMetadata: () => ({ openai: [] }), + getRoutingModelMetadata: () => ({ openai: [] }), + isModelFetchComplete: () => true, + getModelAliases: () => null, + getModelFallback: () => null, + getEffectiveModelFallback: () => ({}), + getAiCreditsUsage: () => ({}), + getMaxRunsUsage: () => ({}), + getMaxCacheMissesUsage: () => ({}), + getPermissionDeniedUsage: () => ({}), + }).reflectEndpoints(); + + expect(result.endpoints[0].routing_models[0]).toMatchObject({ + model_id: 'gpt-5.4-mini', + source: 'incomplete', + supported_reasoning_efforts: null, + context_window_tokens: null, + }); + }); }); describe('model policy filtering in /reflect', () => { diff --git a/containers/api-proxy/model-api-mapping.js b/containers/api-proxy/model-api-mapping.js index e6ee27fcd..0e541f5c6 100644 --- a/containers/api-proxy/model-api-mapping.js +++ b/containers/api-proxy/model-api-mapping.js @@ -134,6 +134,8 @@ function lookupModelRoutingMetadata(model, provider) { endpoints: [...entry.endpoints], reasoningEfforts: [...routing.reasoningEfforts], contextWindowTokens: routing.contextWindowTokens, + ...(routing.reasoningMode === undefined ? {} : { reasoningMode: routing.reasoningMode }), + ...(routing.defaultEffort === undefined ? {} : { defaultEffort: routing.defaultEffort }), }; } diff --git a/containers/api-proxy/model-api-mapping.json b/containers/api-proxy/model-api-mapping.json index f6b18d0f3..e6774bbbe 100644 --- a/containers/api-proxy/model-api-mapping.json +++ b/containers/api-proxy/model-api-mapping.json @@ -1,7 +1,7 @@ { "title": "Model-to-API Endpoint Mapping", "description": "Maps AI model families to supported API endpoints and includes maintained task-routing effort/context metadata for selected model IDs.", - "lastUpdated": "2026-11-08T22:25:19Z", + "lastUpdated": "2026-11-09T00:10:26Z", "sources": { "openai": "https://developers.openai.com/api/docs/models", "openai_routing": "https://developers.openai.com/api/docs/models/gpt-5.4", @@ -140,6 +140,48 @@ ], "notes": "Supports both endpoints. Listed on the official GPT-5.5 model page. gpt-5.5-pro is responses-only (see separate entry above)." }, + { + "family": "gpt-5.4-mini", + "patterns": [ + "gpt-5.4-mini*" + ], + "routingPatterns": [ + "gpt-5.4-mini", + "gpt-5.4-mini-2026-03-17" + ], + "endpoints": [ + "chat_completions", + "responses" + ], + "routing": { + "reasoningEfforts": [ + "none", + "low", + "medium", + "high", + "xhigh" + ], + "contextWindowTokens": 400000, + "reasoningMode": "optional", + "defaultEffort": "none" + }, + "routingEvidence": { + "at": "2026-11-09T00:09:52.371Z", + "scope": { + "provider": "openai", + "channel": "native-api" + }, + "sources": [ + "https://developers.openai.com/api/docs/models/gpt-5.4-mini" + ], + "modelIds": [ + "gpt-5.4-mini", + "gpt-5.4-mini-2026-03-17" + ], + "conditions": "Native OpenAI API model-page window, not a guaranteed remaining input budget or a Copilot/Codex/custom-deployment limit. The page lists none (default), low, medium, high and xhigh and the recorded snapshot." + }, + "notes": "Independently reviewed GPT-5.4 mini effort/context facts; exact routing IDs only. No pro/cyber/research/preview/nano or future dated variants inherit them. Default is metadata, not request insertion." + }, { "family": "gpt-5.4", "patterns": [ @@ -163,7 +205,7 @@ ], "contextWindowTokens": 1050000 }, - "notes": "Supports both endpoints on OpenAI. GPT-5.4 routing metadata is exact-model only; mini/nano variants need separately verified data. The model page lists none, low, medium, high, and xhigh reasoning effort and a 1,050,000-token context window." + "notes": "Supports both endpoints on OpenAI. GPT-5.4 routing metadata is exact-model only; mini has separately reviewed data and nano remains unverified. The model page lists none, low, medium, high, and xhigh reasoning effort and a 1,050,000-token context window." }, { "family": "gpt-5.3-codex", @@ -637,6 +679,46 @@ }, "notes": "Best combination of speed and intelligence with verified 1M-token context windows and the Anthropic effort parameter." }, + { + "family": "claude-opus-4-6", + "patterns": [ + "claude-opus-4-6" + ], + "routingPatterns": [ + "claude-opus-4-6" + ], + "endpoints": [ + "messages" + ], + "routing": { + "reasoningEfforts": [ + "low", + "medium", + "high", + "max" + ], + "contextWindowTokens": 1000000, + "reasoningMode": "optional", + "defaultEffort": "high" + }, + "routingEvidence": { + "at": "2026-11-09T00:10:26.467Z", + "scope": { + "provider": "anthropic", + "channel": "native-api" + }, + "sources": [ + "https://platform.claude.com/docs/en/build-with-claude/effort", + "https://platform.claude.com/docs/en/build-with-claude/context-windows", + "https://github.com/anthropics/ClaudeForFoundationModels/blob/0262e1a766c461a4268dcec656eca95dd74cebf8/Sources/ClaudeForFoundationModels/ClaudeModel.swift" + ], + "modelIds": [ + "claude-opus-4-6" + ], + "conditions": "Top-level output_config.effort on the native Messages API; high is equivalent to omission. Opus 4.6 supports max but not xhigh. Native 1M total context is default without a beta header; request-size and output/thinking tokens still constrain usable input." + }, + "notes": "Reviewed Opus 4.6 separately from 4.7/4.8. No xhigh support; no inferred dated IDs or specialized variants. Default is metadata, not request insertion." + }, { "family": "claude-opus-4", "patterns": [ @@ -644,8 +726,7 @@ ], "routingPatterns": [ "claude-opus-4-8", - "claude-opus-4-7", - "claude-opus-4-6" + "claude-opus-4-7" ], "endpoints": [ "messages" @@ -655,11 +736,31 @@ "low", "medium", "high", + "xhigh", "max" ], - "contextWindowTokens": 1000000 + "contextWindowTokens": 1000000, + "reasoningMode": "optional", + "defaultEffort": "high" + }, + "routingEvidence": { + "at": "2026-11-09T00:10:26.467Z", + "scope": { + "provider": "anthropic", + "channel": "native-api" + }, + "sources": [ + "https://platform.claude.com/docs/en/build-with-claude/effort", + "https://platform.claude.com/docs/en/build-with-claude/context-windows", + "https://github.com/anthropics/ClaudeForFoundationModels/blob/0262e1a766c461a4268dcec656eca95dd74cebf8/Sources/ClaudeForFoundationModels/ClaudeModel.swift" + ], + "modelIds": [ + "claude-opus-4-7", + "claude-opus-4-8" + ], + "conditions": "Top-level output_config.effort on the native Messages API; high is equivalent to omission, while xhigh is a coding recommendation, not the default. Native 1M total context is default without a beta header; request-size and output/thinking tokens still constrain usable input." }, - "notes": "Opus 4.6 and newer models have verified 1M-token context windows and support the Anthropic effort parameter." + "notes": "Reviewed exact Opus 4.7/4.8 effort/context facts. Opus 4.6 has a separate negative-xhigh record; broad endpoint patterns do not grant routing support to other revisions." }, { "family": "claude-sonnet-4", diff --git a/containers/api-proxy/model-api-mapping.test.js b/containers/api-proxy/model-api-mapping.test.js index 6bc7cc773..b6dbee7dc 100644 --- a/containers/api-proxy/model-api-mapping.test.js +++ b/containers/api-proxy/model-api-mapping.test.js @@ -200,7 +200,10 @@ describe('model-api-mapping', () => { reasoningEfforts: ['none', 'low', 'medium', 'high', 'xhigh'], contextWindowTokens: 1_050_000, }); - expect(lookupModelRoutingMetadata('gpt-5.4-mini', 'openai')).toBeNull(); + expect(lookupModelRoutingMetadata('gpt-5.4-mini', 'openai')).toMatchObject({ + reasoningEfforts: ['none', 'low', 'medium', 'high', 'xhigh'], + contextWindowTokens: 400_000, reasoningMode: 'optional', defaultEffort: 'none', + }); expect(lookupModelRoutingMetadata('o3', 'openai')).toBeNull(); expect(lookupModelRoutingMetadata('gpt-5.4-2026-03-05', 'openai')) .toMatchObject({ contextWindowTokens: 1_050_000 }); diff --git a/containers/api-proxy/model-information.fallback-pricing.generated.json b/containers/api-proxy/model-information.fallback-pricing.generated.json index e030e7039..6d6264535 100644 --- a/containers/api-proxy/model-information.fallback-pricing.generated.json +++ b/containers/api-proxy/model-information.fallback-pricing.generated.json @@ -1,5 +1,5 @@ { - "catalogRevision": "c00be1b161139479fc9ce4e6f7dc9786cc864588261cb4152a812a82a62a5829", + "catalogRevision": "8b85e0ae761c3e9c971f3c3018349cb5ae6aec731ae7aefb94ebe9255826799a", "compatibility": { "policy": "legacy_native_compatibility", "channel": "native-api", diff --git a/containers/api-proxy/model-metadata-characterization.test.js b/containers/api-proxy/model-metadata-characterization.test.js index 151c6b7ee..120c10939 100644 --- a/containers/api-proxy/model-metadata-characterization.test.js +++ b/containers/api-proxy/model-metadata-characterization.test.js @@ -152,7 +152,7 @@ describe('model identity is intentionally different between consumers', () => { }); it.each([ - ['gpt-5.4-mini', 'openai'], + ['gpt-5.4-mini', 'openai', true], ['gpt-5.5', 'openai'], ['gpt-5.6', 'openai'], ['gpt-5.6-sol', 'openai'], @@ -162,8 +162,12 @@ describe('model identity is intentionally different between consumers', () => { ['gpt-6-astra', 'openai'], ['gpt-6-luna', 'openai'], ['claude-haiku-5-5', 'anthropic'], - ])('#10030: %s currently has no maintained routing choices', (model, provider) => { - expect(lookupModelRoutingMetadata(model, provider)).toBeNull(); + ])('#10030: %s has only explicitly activated routing facts', (model, provider, active = false) => { + if (active) { + expect(lookupModelRoutingMetadata(model, provider)).toMatchObject({ + reasoningEfforts: ['none', 'low', 'medium', 'high', 'xhigh'], contextWindowTokens: 400_000, + }); + } else expect(lookupModelRoutingMetadata(model, provider)).toBeNull(); }); it.each([ @@ -171,12 +175,13 @@ describe('model identity is intentionally different between consumers', () => { ['claude-opus-5-5', 'anthropic'], ['claude-sonnet-5', 'anthropic'], ['claude-sonnet-5-5', 'anthropic'], - ['claude-opus-4-7', 'anthropic'], - ['claude-opus-4-8', 'anthropic'], - ])('#10030: %s routing metadata currently omits xhigh', (model, provider) => { + ['claude-opus-4-7', 'anthropic', true], + ['claude-opus-4-8', 'anthropic', true], + ['claude-opus-4-6', 'anthropic'], + ])('#10030: %s has revision-specific xhigh coverage', (model, provider, xhigh = false) => { const routing = lookupModelRoutingMetadata(model, provider); expect(routing).not.toBeNull(); - expect(routing.reasoningEfforts).not.toContain('xhigh'); + expect(routing.reasoningEfforts.includes('xhigh')).toBe(xhigh); }); }); diff --git a/containers/api-proxy/model-reasoning.js b/containers/api-proxy/model-reasoning.js index 14c08c8bb..ac9244795 100644 --- a/containers/api-proxy/model-reasoning.js +++ b/containers/api-proxy/model-reasoning.js @@ -134,6 +134,8 @@ function resolveModelReasoning(model, provider, { records = getRuntimeModels(pro identity: resolution.identity, scope, active: true, authority: 'maintained', support: mapped.reasoningEfforts.length ? 'supported' : 'unsupported', rawEfforts: mapped.reasoningEfforts, + mode: mapped.reasoningMode, + default: mapped.defaultEffort, provenance: { authority: 'maintained', source: 'model-api-mapping', at: getModelApiMapping()?.lastUpdated, field: 'routing.reasoningEfforts' }, }); diff --git a/containers/api-proxy/model-reasoning.test.js b/containers/api-proxy/model-reasoning.test.js index 926b1aadc..4a64e7304 100644 --- a/containers/api-proxy/model-reasoning.test.js +++ b/containers/api-proxy/model-reasoning.test.js @@ -132,7 +132,7 @@ describe('shared direct and routing reasoning adapters', () => { it.each([ ['gpt-5.4', 'openai', 'supported'], - ['gpt-5.4-mini', 'openai', 'absent'], + ['gpt-5.4-mini', 'openai', 'supported'], ['gpt-5.5-pro', 'openai', 'absent'], ['gpt-5.6-sol', 'openai', 'absent'], ['claude-opus-4-6', 'anthropic', 'supported'], @@ -146,9 +146,14 @@ describe('shared direct and routing reasoning adapters', () => { ])('uses only reviewed active evidence for specialized %s on %s', (model, provider, support) => { const decision = resolveModelReasoning(model, provider, { records: [] }); expect(decision.support).toBe(support); - expect(decision.mode).toBe('unknown'); - expect(decision).not.toHaveProperty('default'); - if (provider === 'anthropic') expect(decision.supportedEfforts).not.toContain('xhigh'); + const reviewed = (provider === 'openai' && model === 'gpt-5.4-mini') || + (provider === 'anthropic' && /^claude-opus-4-[678]$/.test(model)); + expect(decision.mode).toBe(reviewed ? 'optional' : 'unknown'); + if (reviewed) expect(decision.default).toBe(provider === 'openai' ? 'none' : 'high'); + else expect(decision).not.toHaveProperty('default'); + if (provider === 'anthropic') { + expect(decision.supportedEfforts.includes('xhigh')).toBe(/^claude-opus-4-[78]$/.test(model)); + } }); it('does not apply native maintained evidence to custom deployments or targets', () => { @@ -167,14 +172,14 @@ describe('shared direct and routing reasoning adapters', () => { }).support).toBe('absent'); }); - it('does not reject direct efforts omitted from maintained native routing lists', () => { + it('now selects reviewed xhigh for Opus 4.7/4.8 while rejecting it for 4.6', () => { for (const model of ['claude-opus-4-7', 'claude-opus-4-8']) { const decision = getRequestReasoning(model, 'anthropic', { anthropic: [] }, {}, { targetHost: 'api.anthropic.com', }); expect(decision.support).toBe('supported'); - expect(decision.supportedEfforts).not.toContain('xhigh'); - expect(assessReasoningEffort(decision, 'xhigh', { automatic: true }).admitted).toBe(false); + expect(decision.supportedEfforts).toContain('xhigh'); + expect(assessReasoningEffort(decision, 'xhigh', { automatic: true }).admitted).toBe(true); expect(assessReasoningEffort(decision, 'xhigh', { directMaintainedEfforts: ['xhigh'], }).admitted).toBe(true); diff --git a/containers/api-proxy/model-recovery.js b/containers/api-proxy/model-recovery.js index 9c8748587..d73a89dfc 100644 --- a/containers/api-proxy/model-recovery.js +++ b/containers/api-proxy/model-recovery.js @@ -16,7 +16,7 @@ const { getModelEligibilityScope, } = require('./model-eligibility'); const { assessRequestCompatibility } = require('./protocol-compatibility/assessment'); -const { getRequestReasoning } = require('./model-reasoning'); +const { getRequestReasoning, getReasoningScope } = require('./model-reasoning'); const MAX_AUTOMATIC_RECOVERIES = 3; @@ -73,11 +73,20 @@ function protocolForUrl(url) { // Automatic recovery is deliberately stricter than explicit fallback: unknown // capabilities are not evidence that a replacement can preserve a feature. -function isRecoveryCompatible(record, provider, parsed, url, originalRecord) { +function isRecoveryCompatible(record, provider, parsed, url, originalRecord, req = {}) { const protocol = protocolForUrl(url); if (!parsed || !protocol || record.modelPickerEnabled === false) return false; if (typeof parsed.model === 'string' && parsed.model.includes('?')) return false; - const model = normalizeModel(record.id, record, provider); + const scope = getReasoningScope( + provider, + req.awfFallbackTarget?.targetHost, + req.awfFallbackTarget?.targetScheme, + req, + ); + const reasoningOptions = scope.deployment === undefined + ? undefined + : { scope: getReasoningScope(provider), maintained: false }; + const model = normalizeModel(record.id, record, provider, scope, undefined, reasoningOptions); if (!model.protocols?.includes(protocol)) return false; if (record.supportedEndpoints && !record.supportedEndpoints.some(endpoint => typeof endpoint === 'string' && !endpoint.includes(':') && @@ -86,7 +95,9 @@ function isRecoveryCompatible(record, provider, parsed, url, originalRecord) { const effort = protocol === 'responses' ? parsed.reasoning?.effort : protocol === 'messages' ? parsed.output_config?.effort : parsed.reasoning_effort; if (effort !== undefined && !model.efforts?.includes(effort)) return false; - const original = normalizeModel(originalRecord?.id || parsed.model, originalRecord, provider); + const original = normalizeModel( + originalRecord?.id || parsed.model, originalRecord, provider, scope, undefined, reasoningOptions, + ); if (original?.contextWindow && (!model.contextWindow || model.contextWindow < original.contextWindow)) return false; const outputLimit = record.capabilities?.limits?.max_output_tokens; const originalOutputLimit = originalRecord?.capabilities?.limits?.max_output_tokens; @@ -185,7 +196,7 @@ function getAutomaticRecoveryCandidates({ model, provider, body, url, req, isPer return records.filter(record => record.id.toLowerCase() !== nativeModel(model, provider).toLowerCase() && !getRetiredModelBlockState(record.id, provider, { inputMode: 'native' }) && - isRecoveryCompatible(record, provider, parsed, url, originalRecord) && + isRecoveryCompatible(record, provider, parsed, url, originalRecord, req) && permitted(record.id, provider)) .map(record => record.id) .sort((left, right) => diff --git a/containers/api-proxy/protocol-compatibility.packaging.test.js b/containers/api-proxy/protocol-compatibility.packaging.test.js index e37b2fbef..7097fc9ac 100644 --- a/containers/api-proxy/protocol-compatibility.packaging.test.js +++ b/containers/api-proxy/protocol-compatibility.packaging.test.js @@ -57,6 +57,19 @@ test('contracts and declarations load with translators from the actual Docker CO const {assessRequestCompatibility} = require('./protocol-compatibility/assessment'); assert.equal(assessRequestCompatibility({body:{model:'fixture',input:'hello'}, source:'responses',target:'chat_completions'}).status,'compatible'); + const {resolveModelReasoning} = require('./model-reasoning'); + const {normalizeModel} = require('./routing-catalogue'); + const {getModelRoutingChoices} = require('./routing-candidates'); + const mini = resolveModelReasoning('gpt-5.4-mini-2026-03-17','openai',{records:[]}); + assert.deepEqual(mini.selectableEfforts,['none','low','medium','high','xhigh']); + assert.equal(mini.default,'none'); + assert.equal(normalizeModel('gpt-5.4-mini',undefined,'openai').contextWindow,400000); + assert.equal(normalizeModel('gpt-5.4-mini',undefined,'openai', + {deployment:'custom'}).contextWindow,undefined); + assert.equal(getModelRoutingChoices(normalizeModel('claude-opus-4-7',undefined,'anthropic'), + 'anthropic').some(choice=>choice.effort==='xhigh'),true); + assert.equal(resolveModelReasoning('claude-opus-4-6','anthropic', + {records:[]}).selectableEfforts.includes('xhigh'),false); `], { cwd: root, encoding: 'utf8', timeout: 10000 }); expect({ status: result.status, stderr: result.stderr }).toEqual({ status: 0, stderr: '' }); const integration = spawnSync(process.execPath, ['-e', ` @@ -67,7 +80,8 @@ test('contracts and declarations load with translators from the actual Docker CO const {createModelDecisionObservation} = require('./model-decision-observation'); const {createManagementHandlers} = require('./management'); const {createProxyEligibilityStore} = require('./model-eligibility'); - const models = {copilot:['origin'],anthropic:['candidate'],openai:['native']}; + const models = {copilot:['origin'],anthropic:['candidate'], + openai:['native','gpt-5.4-mini','gpt-5.4-mini-preview']}; const adapters = Object.fromEntries(Object.keys(models).map(provider => [provider,{ name:provider,isEnabled:()=>true,getTargetHost:()=> 'api.'+provider+'.com', getBasePath:()=>'',getAuthHeaders:()=>({}),getBodyTransform:()=>null, @@ -159,6 +173,20 @@ test('contracts and declarations load with translators from the actual Docker CO assert.equal(output.choices[0].message.tool_calls[0].function.arguments,'{"key":"value"}'); assert.equal(output.usage.total_tokens,5); assert.ok(translated.decisions.some(item=>item.reason==='fallback_compatible')); + const reviewed=await run({model:'origin',messages:[{role:'user',content:'hello'}], + reasoning_effort:'xhigh'},['openai/gpt-5.4-mini-preview','openai/gpt-5.4-mini']); + assert.deepEqual(reviewed.calls.map(call=>call.model),['origin','gpt-5.4-mini']); + assert.equal(reviewed.calls[1].body.reasoning_effort,'xhigh'); + const accepted=reviewed.decisions.find(item=>item.reason==='fallback_compatible'); + assert.equal(accepted.identity.model_id,'gpt-5.4-mini'); + assert.equal(accepted.reasoning.support,'supported'); + assert.equal(accepted.reasoning.mode,'optional'); + assert.equal(accepted.reasoning.reason,'reasoning_effort_accepted'); + assert.ok(reviewed.decisions.some(item=>item.reason==='fallback_unverified')); + const invalid=await run({model:'origin',messages:[{role:'user',content:'hello'}], + reasoning_effort:'max'},['openai/gpt-5.4-mini']); + assert.deepEqual(invalid.calls.map(call=>call.model),['origin']); + assert.ok(invalid.decisions.some(item=>item.reason==='fallback_incompatible')); })().catch(error=>{console.error(error);process.exitCode=1;}); `], { cwd: root, encoding: 'utf8', timeout: 10000, env: { ...process.env, AWF_VERSION: '0.0.0-test', NODE_PATH: path.join(__dirname, 'node_modules') } }); diff --git a/containers/api-proxy/reasoning-effort-validation.test.js b/containers/api-proxy/reasoning-effort-validation.test.js index bfdc74f3a..771df002e 100644 --- a/containers/api-proxy/reasoning-effort-validation.test.js +++ b/containers/api-proxy/reasoning-effort-validation.test.js @@ -111,6 +111,10 @@ describe('validateReasoningEffort', () => { .toThrow(expect.objectContaining({ code: 'unsupported_reasoning_effort' })); expect(() => validateReasoningEffort(Buffer.from(JSON.stringify({ model: 'gpt-5.4-mini', reasoning_effort: 'future', + })), 'openai', '/chat/completions', {})) + .toThrow(expect.objectContaining({ code: 'unsupported_reasoning_effort' })); + expect(() => validateReasoningEffort(Buffer.from(JSON.stringify({ + model: 'gpt-5.4-nano', reasoning_effort: 'future', })), 'openai', '/chat/completions', {})).not.toThrow(); }); diff --git a/containers/api-proxy/reviewed-native-reasoning.test.js b/containers/api-proxy/reviewed-native-reasoning.test.js new file mode 100644 index 000000000..929b08791 --- /dev/null +++ b/containers/api-proxy/reviewed-native-reasoning.test.js @@ -0,0 +1,157 @@ +'use strict'; + +const { lookupModelRoutingMetadata } = require('./model-api-mapping'); +const { resolveModelReasoning, getModelReasoning, getRequestReasoning, assessReasoningEffort } = require('./model-reasoning'); +const { normalizeModel } = require('./routing-catalogue'); +const { getModelRoutingChoices } = require('./routing-candidates'); +const { validateReasoningEffort } = require('./reasoning-effort-validation'); +const { clearRuntimeModels, replaceRuntimeModels } = require('./runtime-model-catalog'); + +const miniEfforts = ['none', 'low', 'medium', 'high', 'xhigh']; + +afterEach(() => clearRuntimeModels()); + +describe('reviewed native exact-model reasoning and context', () => { + test.each(['gpt-5.4-mini', 'gpt-5.4-mini-2026-03-17'])('%s has independently reviewed mini facts', model => { + expect(lookupModelRoutingMetadata(model, 'openai')).toMatchObject({ + reasoningEfforts: miniEfforts, contextWindowTokens: 400_000, + }); + const decision = resolveModelReasoning(model, 'openai', { records: [] }); + const normalized = normalizeModel(model, undefined, 'openai'); + expect(getModelReasoning(normalized, 'openai')).toEqual(decision); + expect(normalized.contextWindow).toBe(400_000); + expect(decision).toMatchObject({ + support: 'supported', mode: 'optional', default: 'none', selectableEfforts: miniEfforts, + }); + expect(getModelRoutingChoices(normalized, 'openai')).toEqual( + miniEfforts.map(effort => ({ effort, protocol: 'responses' })), + ); + for (const effort of miniEfforts) { + const body = Buffer.from(JSON.stringify({ model, reasoning: { effort } })); + const original = Buffer.from(body); + expect(() => validateReasoningEffort(body, 'openai', '/v1/responses', {})).not.toThrow(); + expect(body).toEqual(original); + expect(assessReasoningEffort(decision, effort, { automatic: true }).admitted).toBe(true); + } + for (const effort of ['minimal', 'max', 'future']) { + expect(() => validateReasoningEffort(Buffer.from(JSON.stringify({ + model, reasoning: { effort }, + })), 'openai', '/v1/responses', {})).toThrow(expect.objectContaining({ + code: 'unsupported_reasoning_effort', statusCode: 400, + })); + expect(assessReasoningEffort(decision, effort, { automatic: true }).admitted).toBe(false); + } + const omitted = Buffer.from(JSON.stringify({ model, input: 'hello' })); + expect(() => validateReasoningEffort(omitted, 'openai', '/v1/responses', {})).not.toThrow(); + expect(JSON.parse(omitted)).not.toHaveProperty('reasoning'); + expect(assessReasoningEffort(decision, undefined, { automatic: true }).admitted).toBe(true); + }); + + test.each([ + 'gpt-5.4-pro', 'gpt-5.4-nano', 'gpt-5.4-mini-pro', 'gpt-5.4-mini-cyber', + 'gpt-5.4-mini-research', 'gpt-5.4-mini-preview', 'gpt-5.4-mini-nano', + 'gpt-5.4-mini-2099-01-01', 'gpt-5.4-2099-01-01', + 'gpt-5.5-pro', 'gpt-5.6-cyber', + ])('%s cannot borrow base or mini routing facts', model => { + expect(lookupModelRoutingMetadata(model, 'openai')).toBeNull(); + const normalized = normalizeModel(model, undefined, 'openai'); + expect(normalized).not.toHaveProperty('contextWindow'); + expect(getModelRoutingChoices(normalized, 'openai')).toEqual([]); + const decision = resolveModelReasoning(model, 'openai', { records: [] }); + expect(decision.support).toBe('absent'); + expect(assessReasoningEffort(decision, 'future').admitted).toBe(true); + expect(assessReasoningEffort(decision, 'high', { automatic: true }).admitted).toBe(false); + }); + + test.each([ + ['claude-opus-4-6', ['low', 'medium', 'high', 'max']], + ['claude-opus-4-7', ['low', 'medium', 'high', 'xhigh', 'max']], + ['claude-opus-4-8', ['low', 'medium', 'high', 'xhigh', 'max']], + ])('%s uses revision-specific native evidence', (model, efforts) => { + const normalized = normalizeModel(model, undefined, 'anthropic'); + const decision = getModelReasoning(normalized, 'anthropic'); + expect(decision).toMatchObject({ + support: 'supported', mode: 'optional', default: 'high', selectableEfforts: efforts, + }); + expect(normalized.contextWindow).toBe(1_000_000); + expect(getModelRoutingChoices(normalized, 'anthropic')).toEqual( + efforts.map(effort => ({ effort, protocol: 'messages' })), + ); + for (const effort of [...efforts, undefined]) { + const body = Buffer.from(JSON.stringify({ model, max_tokens: 1024, output_config: { effort } })); + const original = Buffer.from(body); + expect(() => validateReasoningEffort(body, 'anthropic', '/v1/messages', {})).not.toThrow(); + expect(body).toEqual(original); + } + for (const effort of ['none', 'minimal', 'future', ...(model.endsWith('-6') ? ['xhigh'] : [])]) { + expect(() => validateReasoningEffort(Buffer.from(JSON.stringify({ + model, output_config: { effort }, + })), 'anthropic', '/v1/messages', {})).toThrow(expect.objectContaining({ + code: 'unsupported_reasoning_effort', + })); + } + }); + + test.each([ + 'claude-opus-4-6-20990101', 'claude-opus-4-7-20990101', 'claude-opus-4-8-20990101', + 'claude-opus-4-9', 'claude-opus-4-8-preview', 'claude-opus-4-8-fast', + 'claude-opus-4.8', 'claude-opus-4.7', 'claude-opus-4.6', + ])('%s has no newly inferred native alias or revision', model => { + expect(lookupModelRoutingMetadata(model, 'anthropic')).toBeNull(); + expect(resolveModelReasoning(model, 'anthropic', { records: [] }).support).toBe('absent'); + expect(getModelRoutingChoices(normalizeModel(model, undefined, 'anthropic'), 'anthropic')).toEqual([]); + }); + + test('unreviewed active models retain unknown mode/default and provider observations override maintained lists', () => { + const base = resolveModelReasoning('gpt-5.4', 'openai', { records: [] }); + expect(base.mode).toBe('unknown'); + expect(base).not.toHaveProperty('default'); + const unknown = resolveModelReasoning('gpt-5.4-mini', 'openai', { + records: [{ id: 'gpt-5.4-mini', supportedReasoningEfforts: 'unverified' }], + }); + expect(unknown).toMatchObject({ support: 'unknown', mode: 'unknown', selectableEfforts: [] }); + expect(unknown).not.toHaveProperty('default'); + expect(assessReasoningEffort(unknown, 'high').admitted).toBe(true); + expect(assessReasoningEffort(unknown, 'high', { automatic: true }).admitted).toBe(false); + const forbidden = resolveModelReasoning('gpt-5.4-mini', 'openai', { + records: [{ id: 'gpt-5.4-mini', supportedReasoningEfforts: [] }], + }); + expect(forbidden).toMatchObject({ support: 'unsupported', mode: 'forbidden' }); + expect(forbidden).not.toHaveProperty('default'); + expect(assessReasoningEffort(forbidden, 'high').admitted).toBe(false); + }); + + test.each(['copilot', 'openrouter', 'anthropic'])('mini facts do not cross into %s', provider => { + const normalized = normalizeModel('gpt-5.4-mini', undefined, provider); + expect(getModelReasoning(normalized, provider).support).toBe('absent'); + expect(normalized).not.toHaveProperty('contextWindow'); + expect(getModelRoutingChoices(normalized, provider)).toEqual([]); + }); + + test.each([ + ['gpt-5.4', { provider: 'openai', channel: 'native-api', deployment: 'custom' }], + ['gpt-5.4-mini', { provider: 'openai', channel: 'native-api', deployment: 'custom' }], + ['gpt-5.4-mini', { provider: 'openai', channel: 'copilot-api' }], + ])('%s native reasoning and context do not leak into scope %j', (model, scope) => { + const normalized = normalizeModel(model, undefined, 'openai', scope); + expect(getModelReasoning(normalized, 'openai').support).toBe('absent'); + expect(normalized).not.toHaveProperty('contextWindow'); + const observed = normalizeModel(model, { + capabilities: { limits: { max_context_window_tokens: 12345 } }, + }, 'openai', scope); + expect(observed.contextWindow).toBe(12345); + }); + + test('request and selection pins survive provider refresh without changing maintained facts', () => { + const model = 'gpt-5.4-mini'; + const req = {}; + const pinned = getRequestReasoning(model, 'openai', {}, req); + const selected = normalizeModel(model, undefined, 'openai'); + replaceRuntimeModels('openai', [{ id: model, supportedReasoningEfforts: ['low'] }]); + expect(getRequestReasoning(model, 'openai', undefined, req)).toBe(pinned); + expect(getModelReasoning(selected, 'openai')).toEqual(pinned); + expect(getRequestReasoning(model, 'openai').supportedEfforts).toEqual(['low']); + expect(getRequestReasoning(model, 'openai', undefined, { awfReasoning: pinned })).toBe(pinned); + expect(selected.contextWindow).toBe(400_000); + }); +}); diff --git a/containers/api-proxy/routing-catalogue.js b/containers/api-proxy/routing-catalogue.js index c7d0dd030..cdf990d63 100644 --- a/containers/api-proxy/routing-catalogue.js +++ b/containers/api-proxy/routing-catalogue.js @@ -29,12 +29,17 @@ function freezeModel(model) { return Object.freeze(model); } -function normalizeModel(id, metadata, provider, scope, records) { - const mapped = lookupModelRoutingMetadata(id, provider); +function normalizeModel(id, metadata, provider, scope, records, reasoningOptions) { + const mapped = scope?.deployment === undefined && + (scope?.channel === undefined || scope.channel === 'native-api') + ? lookupModelRoutingMetadata(id, provider) : null; const endpointMapping = lookupModelEndpoints(id, provider); const limits = metadata?.capabilities?.limits; + const { scope: reasoningScope = scope, maintained } = reasoningOptions || {}; const reasoning = resolveModelReasoning(id, provider, { - records: records || (metadata ? [{ ...metadata, id: metadata.id || id }] : []), scope, + records: records || (metadata ? [{ ...metadata, id: metadata.id || id }] : []), + scope: reasoningScope, + ...(maintained === undefined ? {} : { maintained }), }); const efforts = ['absent', 'unknown'].includes(reasoning.support) ? undefined : reasoning.supportedEfforts; const runtimeContextWindow = limits?.max_context_window_tokens; diff --git a/containers/api-proxy/server.model-recovery.test.js b/containers/api-proxy/server.model-recovery.test.js index 3920f330c..a9bc966cb 100644 --- a/containers/api-proxy/server.model-recovery.test.js +++ b/containers/api-proxy/server.model-recovery.test.js @@ -309,6 +309,22 @@ test('ignores opaque tool arguments and image source metadata but checks nested }, 'anthropic', request, '/v1/messages')).toBe(false); }); +test('does not use maintained context limits when checking recovery on a custom target', () => { + const { isRecoveryCompatible } = require('./model-recovery'); + const original = { id: 'gpt-5.4-mini' }; + const candidate = { + id: 'replacement', + supportedEndpoints: ['/responses'], + capabilities: { limits: { max_context_window_tokens: 300_000 } }, + }; + const request = { model: original.id, input: 'check' }; + + expect(isRecoveryCompatible(candidate, 'openai', request, '/v1/responses', original)).toBe(false); + expect(isRecoveryCompatible(candidate, 'openai', request, '/v1/responses', original, { + awfFallbackTarget: { targetHost: 'router.example.com', targetScheme: 'https' }, + })).toBe(true); +}); + test('returns to the original endpoint when replacing a model rejected on both wire APIs', async () => { catalog.replaceRuntimeModels('copilot', [record('primary'), record('next')]); await start({ model: 'primary', messages: [] }); diff --git a/containers/api-proxy/upstream-http.compatibility.test.js b/containers/api-proxy/upstream-http.compatibility.test.js index f85de423c..902207c2e 100644 --- a/containers/api-proxy/upstream-http.compatibility.test.js +++ b/containers/api-proxy/upstream-http.compatibility.test.js @@ -196,6 +196,42 @@ test('explicit effort skips unsupported and unverified models without changing t expect(h.observe.mock.calls.map(([r]) => r.compatibility.status)).toEqual(['incompatible', 'unverified', 'compatible']); }); +test.each(['gpt-5.4-mini', 'gpt-5.4-mini-2026-03-17'])('native fallback dispatch consumes reviewed %s efforts', model => { + const source = { model: 'origin', input: 'hello', reasoning: { effort: 'xhigh' } }; + const h = harness({ + provider: 'openai', targetHost: 'api.openai.com', source, + chain: ['gpt-5.4-mini-preview', model], req: { awfRuntimePricing: {} }, + }); + expect(h.fail(0).onModelFallback({ reason: 'upstream_5xx' })).toBe(true); + expect(h.attempts.map(a => a.body.model)).toEqual(['origin', model]); + expect(h.attempts[1].body).toEqual({ ...source, model }); + expect(h.observe.mock.calls.map(([r]) => [r.model, r.outcome, r.compatibility.status])).toEqual([ + ['gpt-5.4-mini-preview', 'skipped', 'unverified'], [model, 'accepted', 'compatible'], + ]); + expect(h.observe.mock.calls[1][0]).toMatchObject({ + compatibility: { + reasoning: { support: 'supported', mode: 'optional', code: 'reasoning_effort_accepted' }, + pins: { eligibilityRevision: 'eligibility-pinned', catalogueRevision: 'catalogue-pinned' }, + }, + }); +}); + +test('native fallback does not strip or substitute an unsupported mini effort', () => { + const source = { model: 'origin', input: 'hello', reasoning: { effort: 'max' } }; + const h = harness({ + provider: 'openai', targetHost: 'api.openai.com', source, + chain: ['gpt-5.4-mini'], req: { awfRuntimePricing: {} }, + }); + expect(h.fail(0).onModelFallback({ reason: 'upstream_5xx' })).toBe(false); + expect(h.attempts).toHaveLength(1); + expect(h.attempts[0].body).toEqual(source); + expect(h.observe.mock.calls[0][0]).toMatchObject({ + model: 'gpt-5.4-mini', outcome: 'skipped', compatibility: { + status: 'incompatible', reasoning: { code: 'reasoning_effort_unsupported' }, + }, + }); +}); + test('alternate-endpoint and ranked alias retries skip incompatible endpoints and keep candidate order', () => { replaceRuntimeModels('copilot', [{ id: 'chat-only', supportedEndpoints: ['/chat/completions'] }]); const source = { model: 'origin', input: 'hi', tools: [{ type: 'custom', name: 'apply_patch' }] }; diff --git a/docs/model-api-mapping.json b/docs/model-api-mapping.json index f6b18d0f3..e6774bbbe 100644 --- a/docs/model-api-mapping.json +++ b/docs/model-api-mapping.json @@ -1,7 +1,7 @@ { "title": "Model-to-API Endpoint Mapping", "description": "Maps AI model families to supported API endpoints and includes maintained task-routing effort/context metadata for selected model IDs.", - "lastUpdated": "2026-11-08T22:25:19Z", + "lastUpdated": "2026-11-09T00:10:26Z", "sources": { "openai": "https://developers.openai.com/api/docs/models", "openai_routing": "https://developers.openai.com/api/docs/models/gpt-5.4", @@ -140,6 +140,48 @@ ], "notes": "Supports both endpoints. Listed on the official GPT-5.5 model page. gpt-5.5-pro is responses-only (see separate entry above)." }, + { + "family": "gpt-5.4-mini", + "patterns": [ + "gpt-5.4-mini*" + ], + "routingPatterns": [ + "gpt-5.4-mini", + "gpt-5.4-mini-2026-03-17" + ], + "endpoints": [ + "chat_completions", + "responses" + ], + "routing": { + "reasoningEfforts": [ + "none", + "low", + "medium", + "high", + "xhigh" + ], + "contextWindowTokens": 400000, + "reasoningMode": "optional", + "defaultEffort": "none" + }, + "routingEvidence": { + "at": "2026-11-09T00:09:52.371Z", + "scope": { + "provider": "openai", + "channel": "native-api" + }, + "sources": [ + "https://developers.openai.com/api/docs/models/gpt-5.4-mini" + ], + "modelIds": [ + "gpt-5.4-mini", + "gpt-5.4-mini-2026-03-17" + ], + "conditions": "Native OpenAI API model-page window, not a guaranteed remaining input budget or a Copilot/Codex/custom-deployment limit. The page lists none (default), low, medium, high and xhigh and the recorded snapshot." + }, + "notes": "Independently reviewed GPT-5.4 mini effort/context facts; exact routing IDs only. No pro/cyber/research/preview/nano or future dated variants inherit them. Default is metadata, not request insertion." + }, { "family": "gpt-5.4", "patterns": [ @@ -163,7 +205,7 @@ ], "contextWindowTokens": 1050000 }, - "notes": "Supports both endpoints on OpenAI. GPT-5.4 routing metadata is exact-model only; mini/nano variants need separately verified data. The model page lists none, low, medium, high, and xhigh reasoning effort and a 1,050,000-token context window." + "notes": "Supports both endpoints on OpenAI. GPT-5.4 routing metadata is exact-model only; mini has separately reviewed data and nano remains unverified. The model page lists none, low, medium, high, and xhigh reasoning effort and a 1,050,000-token context window." }, { "family": "gpt-5.3-codex", @@ -637,6 +679,46 @@ }, "notes": "Best combination of speed and intelligence with verified 1M-token context windows and the Anthropic effort parameter." }, + { + "family": "claude-opus-4-6", + "patterns": [ + "claude-opus-4-6" + ], + "routingPatterns": [ + "claude-opus-4-6" + ], + "endpoints": [ + "messages" + ], + "routing": { + "reasoningEfforts": [ + "low", + "medium", + "high", + "max" + ], + "contextWindowTokens": 1000000, + "reasoningMode": "optional", + "defaultEffort": "high" + }, + "routingEvidence": { + "at": "2026-11-09T00:10:26.467Z", + "scope": { + "provider": "anthropic", + "channel": "native-api" + }, + "sources": [ + "https://platform.claude.com/docs/en/build-with-claude/effort", + "https://platform.claude.com/docs/en/build-with-claude/context-windows", + "https://github.com/anthropics/ClaudeForFoundationModels/blob/0262e1a766c461a4268dcec656eca95dd74cebf8/Sources/ClaudeForFoundationModels/ClaudeModel.swift" + ], + "modelIds": [ + "claude-opus-4-6" + ], + "conditions": "Top-level output_config.effort on the native Messages API; high is equivalent to omission. Opus 4.6 supports max but not xhigh. Native 1M total context is default without a beta header; request-size and output/thinking tokens still constrain usable input." + }, + "notes": "Reviewed Opus 4.6 separately from 4.7/4.8. No xhigh support; no inferred dated IDs or specialized variants. Default is metadata, not request insertion." + }, { "family": "claude-opus-4", "patterns": [ @@ -644,8 +726,7 @@ ], "routingPatterns": [ "claude-opus-4-8", - "claude-opus-4-7", - "claude-opus-4-6" + "claude-opus-4-7" ], "endpoints": [ "messages" @@ -655,11 +736,31 @@ "low", "medium", "high", + "xhigh", "max" ], - "contextWindowTokens": 1000000 + "contextWindowTokens": 1000000, + "reasoningMode": "optional", + "defaultEffort": "high" + }, + "routingEvidence": { + "at": "2026-11-09T00:10:26.467Z", + "scope": { + "provider": "anthropic", + "channel": "native-api" + }, + "sources": [ + "https://platform.claude.com/docs/en/build-with-claude/effort", + "https://platform.claude.com/docs/en/build-with-claude/context-windows", + "https://github.com/anthropics/ClaudeForFoundationModels/blob/0262e1a766c461a4268dcec656eca95dd74cebf8/Sources/ClaudeForFoundationModels/ClaudeModel.swift" + ], + "modelIds": [ + "claude-opus-4-7", + "claude-opus-4-8" + ], + "conditions": "Top-level output_config.effort on the native Messages API; high is equivalent to omission, while xhigh is a coding recommendation, not the default. Native 1M total context is default without a beta header; request-size and output/thinking tokens still constrain usable input." }, - "notes": "Opus 4.6 and newer models have verified 1M-token context windows and support the Anthropic effort parameter." + "notes": "Reviewed exact Opus 4.7/4.8 effort/context facts. Opus 4.6 has a separate negative-xhigh record; broad endpoint patterns do not grant routing support to other revisions." }, { "family": "claude-sonnet-4", diff --git a/docs/model-catalogue-publication.md b/docs/model-catalogue-publication.md index d587ffaae..34d1d4c0c 100644 --- a/docs/model-catalogue-publication.md +++ b/docs/model-catalogue-publication.md @@ -150,6 +150,126 @@ Generalized assembled tariffs, promotions/successors, non-token charges, broader export/reasoning migrations and harness/compiler/VM changes remain outside this slice. This is not completion of #10295 or #10290. +## Reviewed native reasoning and context activation + +This bounded #11330 review starts from the merged #11328 implementation +(`5785815`), after verifying its live merged state on November 8, 2026. +Canonical authoring remains in `shared/model-information/sources/mapping.json`; +only the four delivered mini/Opus-4 target rows are removed from +`sources/target.json`. Its unrelated source provenance, pricing, availability, +effort, lifecycle, harness and translation proposals remain staged. Generated +mapping/catalogue copies are produced by `npm run models:generate`. + +### Refreshed evidence and scope + +The original provider pages were read through the browser, not inferred from +Copilot observations, an SDK-wide enum, accounting families or OpenRouter. +Direct fetches initially failed DNS; browser reads returned HTTP 200. Capture +crossed midnight: OpenAI was captured at **2026-11-09T00:09:52Z**, Anthropic at +**2026-11-09T00:10:26Z**. These are capture times, not release dates. +Per-entry `routingEvidence` records original sources, exact IDs and native-API +scope. The mapping revision changes for substantive facts, not a timestamp-only +refresh. Unchanged entries are not recertified by its aggregate `lastUpdated`. + +- [GPT-5.4 mini's original model page](https://developers.openai.com/api/docs/models/gpt-5.4-mini) + independently lists `none (default), low, medium, high and xhigh`, a + **400,000**-token context window, and snapshot `gpt-5.4-mini-2026-03-17`. + These apply to native OpenAI serving, not Copilot, Codex harness settings, + imported publisher namespaces or custom deployments. +- [Anthropic's original effort guide](https://platform.claude.com/docs/en/build-with-claude/effort) + explicitly lists Opus 4.7/4.8 for `xhigh`, but not Opus 4.6, and warns + "Not every model that supports max supports xhigh." It states that the API + default is `high` for these models and is equivalent to omission. + The `xhigh` coding recommendation is **not** a default. +- [Anthropic's original context guide](https://platform.claude.com/docs/en/build-with-claude/context-windows) + names Opus 4.6/4.7/4.8 with a **1M**-token default context and no required + long-context beta header. The exact existing native IDs are corroborated by + [Anthropic's pinned model implementation](https://github.com/anthropics/ClaudeForFoundationModels/blob/0262e1a766c461a4268dcec656eca95dd74cebf8/Sources/ClaudeForFoundationModels/ClaudeModel.swift). + Top-level `output_config.effort` is the reviewed surface, not per-message beta + effort, Bedrock, Managed Agents or Copilot. + +Windows describe total native model context, **not guaranteed remaining input**. +Output/thinking tokens, accumulated history and request-size limits can reduce +usable input. No token counting, live-fit guarantee, new availability or output +limit is inferred. Provider runtime context observations retain precedence. + +### Before/after behavior ledger + +| Exact native IDs | Before | After | Intentional selection change | +| --- | --- | --- | --- | +| `openai/gpt-5.4-mini`, `openai/gpt-5.4-mini-2026-03-17` | No effort/context metadata | `none, low, medium, high, xhigh`; 400,000 context; optional effort, default `none` | Five explicit Responses choices become selectable when discovery, policy and eligibility permit. Invalid `minimal`, `max` and future efforts now fail direct validation. | +| `anthropic/claude-opus-4-6` | `low, medium, high, max`; 1M context; unknown mode/default | Same effort list/context, separate exact entry; optional effort, default `high` | No new explicit choice; `xhigh` remains rejected. | +| `anthropic/claude-opus-4-7`, `anthropic/claude-opus-4-8` | `low, medium, high, max`; 1M context; unknown mode/default | Add `xhigh`; optional effort, default `high` | Each gains one automatic `xhigh` choice. Direct `xhigh` was already admitted by the preserved exact exception; automatic fallback is now admitted by shared evidence. | +| `openai/gpt-5.4`, `openai/gpt-5.4-2026-03-05` | Five efforts; 1,050,000 context; unknown mode/default | Unchanged; original page rechecked | No delivered correction is repeated or inherited by mini/nano. | + +Optionality now admits omitted effort in the shared assessment for the reviewed +models. The router still enumerates explicit efforts, and **no default is inserted +into a request**. Defaults are descriptive resolver metadata, not effort +substitution. The existing resolver consumes the new maintained mode/default +fields through the mapping adapter; no second capability evaluator is added. +The compiler rejects malformed effort values, forbidden mode with supported +efforts, required mode without supported efforts, and defaults outside the +supported list before writing generated projections. Future non-empty effort +names remain representable, but are not automatically selectable until understood. +Absent/unknown direct support remains passthrough and automatic explicit effort +still requires known, understood support. Higher-authority provider observations, +request/selection pins, pricing, retirement, policy, harness admission, fallback +ordering and opt-outs remain authoritative. + +One tightly coupled consumer correction gates maintained routing context by the +same native channel/deployment boundary as maintained reasoning. Previously, +normalizing native GPT-5.4 in a custom scope incorrectly supplied its native +1,050,000-token context even though reasoning was absent. Custom scopes now +retain their own runtime limits or unknown context, not native fallback facts. +This prevents the same leak for the newly activated mini data. + +### #10030 reconciliation and remaining work + +Delivered here: separately verified GPT-5.4 mini and its recorded snapshot, +Opus 4.6's negative `xhigh` exception, Opus 4.7/4.8's `xhigh`, and the reviewed +models' optionality/default metadata. No new separator/date alias normalization +is introduced: unlisted dated revisions and dotted native Opus spellings remain +unknown. Pro/cyber/research/preview/nano/fast variants gain no routing support. +The native `gpt-5.6` alias is not added to global naming. + +Original pages were also refreshed for the remaining proposed OpenAI IDs: +[`gpt-5.5`](https://developers.openai.com/api/docs/models/gpt-5.5), +[`gpt-5.6`](https://developers.openai.com/api/docs/models/gpt-5.6), +[`gpt-5.6-sol`](https://developers.openai.com/api/docs/models/gpt-5.6-sol), +[`gpt-5.6-terra`](https://developers.openai.com/api/docs/models/gpt-5.6-terra), +[`gpt-5.6-luna`](https://developers.openai.com/api/docs/models/gpt-5.6-luna), +[`gpt-6-astra`](https://developers.openai.com/api/docs/models/gpt-6-astra), +[`gpt-6-sol`](https://developers.openai.com/api/docs/models/gpt-6-sol), +[`gpt-6-luna`](https://developers.openai.com/api/docs/models/gpt-6-luna), and +[`gpt-6.1-sol`](https://developers.openai.com/api/docs/models/gpt-6.1-sol). +Their targets remain **inactive**, not automatically approved by this review. +Notably, GPT-6 Sol/Luna restrict Chat Completions function calling to effort +`none`; GPT-6.1 Sol's marketed native 1,050,000 context is distinct from its +documented 500K default in Codex/ChatGPT Work. These conditions must not be lost +in a broader activation. + +Anthropic's refreshed effort/context guides and +[model overview](https://platform.claude.com/docs/en/models/overview) corroborate +Opus 5/5.5, Sonnet 5/5.5 and Haiku 5.5 effort claims, but those changes remain +staged. The effort guide documents model-specific `thinking` restrictions: +for example, Haiku 5.5 rejects disabled thinking at `xhigh`/`max`, and Sonnet 5.5 +rejects `between_tools` at those levels. Protocol translation compatibility +cannot establish those native conditions or faithful translation. Fable/Mythos, +per-message beta effort and unrelated Sonnet 4.6 targets also remain untouched. + +Evidence gaps remain for specialized/future variants not individually reviewed, +Copilot serving of identical slugs, imported/custom backend capabilities, +unlisted snapshots and their conditional/effective limits. They remain unknown, +not unsupported. This does **not** close #10030, #10296 or #10290, prove full +translator parity, downstream adoption or measured live-agent improvement. +No live inference or workflow dispatch is part of this deterministic slice. + +Provider-free combined checks exercise shared reasoning, direct validation, +router choices, actual fallback dispatch and `/reflect`, including the Docker +COPY layout and extracted npm package. Mapping copies must match, compiler +checks must pass, invalid/unknown efforts and negative variants stay covered, +and refresh cannot rewrite in-flight reasoning or selection. + ## Exact-decimal accounting Active accounting uses `shared/model-information/exact-pricing.js`, shipped by diff --git a/scripts/model-information/compile.cjs b/scripts/model-information/compile.cjs index f64dc1324..0adefb4a9 100644 --- a/scripts/model-information/compile.cjs +++ b/scripts/model-information/compile.cjs @@ -139,8 +139,16 @@ function compile() { (entry.routingPatterns && (!Array.isArray(entry.routingPatterns) || entry.routingPatterns.some(pattern => typeof pattern !== 'string' || !pattern))) || (entry.routing && (!Array.isArray(entry.routing.reasoningEfforts) || + entry.routing.reasoningEfforts.some(effort => typeof effort !== 'string' || !effort) || !Number.isSafeInteger(entry.routing.contextWindowTokens) || - entry.routing.contextWindowTokens < 1))) { + entry.routing.contextWindowTokens < 1 || + (entry.routing.reasoningMode !== undefined && + !['optional', 'required', 'forbidden', 'unknown'].includes(entry.routing.reasoningMode)) || + (entry.routing.reasoningMode === 'forbidden' && entry.routing.reasoningEfforts.length > 0) || + (entry.routing.reasoningMode === 'required' && entry.routing.reasoningEfforts.length === 0) || + (entry.routing.defaultEffort !== undefined && + (!entry.routing.reasoningEfforts.includes(entry.routing.defaultEffort) || + entry.routing.reasoningMode === 'forbidden'))))) { errors.push(`mapping.json: ${provider}.models[${index}]: invalid mapping entry`); } if (families.has(entry.family)) errors.push(`mapping.json: ${provider}: duplicate family ${entry.family}`); diff --git a/scripts/model-information/compile.test.ts b/scripts/model-information/compile.test.ts index d1d50d7e3..9b8bff27b 100644 --- a/scripts/model-information/compile.test.ts +++ b/scripts/model-information/compile.test.ts @@ -453,8 +453,8 @@ describe('maintained model compilation', () => { expect(lookup('openai/gpt-6.1-sol').reasoning.selectableEfforts).not.toContain('none'); expect(lookup('openai/gpt-5.6-sol').reasoning.selectableEfforts).toContain('none'); expect(lookup('openai/gpt-5.6-cyber').reasoning.support).toBe('unknown'); - expect(lookup('anthropic/claude-opus-4.6').reasoning.selectableEfforts).not.toContain('xhigh'); - expect(lookup('anthropic/claude-opus-4.8').reasoning.selectableEfforts).toContain('xhigh'); + expect(lookup('anthropic/claude-opus-4.6').reasoning).toBeUndefined(); + expect(lookup('anthropic/claude-opus-4.8').reasoning).toBeUndefined(); expect(lookup('anthropic/claude-fable-5.1').reasoning.selectableEfforts).toContain('xhigh'); expect(lookup('anthropic/claude-mythos-preview').reasoning.selectableEfforts).not.toContain('xhigh'); expect(delta.mapping.target.providers.anthropic.models.find( @@ -469,6 +469,15 @@ describe('maintained model compilation', () => { (entry: { family: string }) => entry.family === 'claude-opus-4-6'); expect(opusFour.routing.reasoningEfforts).toContain('xhigh'); expect(opusFourSix.routing.reasoningEfforts).not.toContain('xhigh'); + for (const [provider, family] of [ + ['openai', 'gpt-5.4-mini'], ['anthropic', 'claude-opus-4'], ['anthropic', 'claude-opus-4-6'], + ]) { + expect(delta.mapping.target.providers[provider].models.find( + (entry: { family: string }) => entry.family === family, + )).toEqual(delta.mapping.baseline.providers[provider].models.find( + (entry: { family: string }) => entry.family === family, + )); + } const importedTarget = lookup('openai/gpt-5.5'); expect(importedTarget.importedPricing).toEqual(importedBaseline.importedPricing); expect(importedTarget.reasoning.selectableEfforts).toContain('xhigh'); @@ -499,6 +508,31 @@ describe('maintained model compilation', () => { } }); + it.each([ + { reasoningMode: 'invented' }, + { defaultEffort: 'max' }, + { reasoningMode: 'forbidden', defaultEffort: 'none' }, + { reasoningMode: 'forbidden', defaultEffort: undefined }, + { reasoningMode: 'required', reasoningEfforts: [], defaultEffort: undefined }, + { reasoningEfforts: ['none', 42] }, + { reasoningEfforts: ['none', ''] }, + ])('rejects invalid reviewed routing mode/default %j before generation', fields => { + const temp = fs.mkdtempSync(path.join(os.tmpdir(), 'awf-model-routing-')); + try { + fs.cpSync(path.join(root, 'shared/model-information/sources'), temp, { recursive: true }); + const file = path.join(temp, 'mapping.json'); + const source = JSON.parse(fs.readFileSync(file, 'utf8')); + const mini = source.mapping.providers.openai.models.find( + (entry: { family: string }) => entry.family === 'gpt-5.4-mini', + ); + Object.assign(mini.routing, fields); + fs.writeFileSync(file, JSON.stringify(source)); + expect(() => run('--check', `--source-dir=${temp}`)).toThrow(/mapping.json: openai.*invalid mapping entry/); + } finally { + fs.rmSync(temp, { recursive: true, force: true }); + } + }); + it.each(['missing provenance', 'missing timestamp', 'invalid timestamp', 'non-string timestamp'])( 'rejects %s in lifecycle compatibility provenance before deriving timestamps', kind => { diff --git a/shared/model-information/baseline-to-target.generated.json b/shared/model-information/baseline-to-target.generated.json index c9be58f1b..27f392d19 100644 --- a/shared/model-information/baseline-to-target.generated.json +++ b/shared/model-information/baseline-to-target.generated.json @@ -1,6 +1,6 @@ { "schemaVersion": 1, - "catalogRevision": "c00be1b161139479fc9ce4e6f7dc9786cc864588261cb4152a812a82a62a5829", + "catalogRevision": "8b85e0ae761c3e9c971f3c3018349cb5ae6aec731ae7aefb94ebe9255826799a", "activation": "staged: phases 4, 5 and 6", "differences": [ { @@ -728,571 +728,6 @@ } } }, - { - "key": "anthropic/claude-opus-4.6", - "baseline": { - "schemaVersion": 1, - "identity": { - "key": "anthropic/claude-opus-4.6", - "provider": "anthropic", - "rawId": "claude-opus-4.6", - "lookupId": "claude-opus-4-6" - }, - "lifecycle": { - "status": "active" - }, - "modelType": "other", - "importedPricing": { - "sourceNamespace": "anthropic", - "currency": "USD", - "unit": "USD_PER_1M_TOKENS", - "components": { - "input": { - "price": "5", - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - }, - "output": { - "price": "25", - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - }, - "cachedInput": { - "price": "0.5", - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - }, - "cacheWrite": { - "price": "6.25", - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - } - }, - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - }, - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - }, - "target": { - "schemaVersion": 1, - "identity": { - "key": "anthropic/claude-opus-4.6", - "provider": "anthropic", - "rawId": "claude-opus-4.6", - "lookupId": "claude-opus-4-6", - "family": "claude-opus-4" - }, - "lifecycle": { - "status": "active" - }, - "modelType": "other", - "importedPricing": { - "sourceNamespace": "anthropic", - "currency": "USD", - "unit": "USD_PER_1M_TOKENS", - "components": { - "input": { - "price": "5", - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - }, - "output": { - "price": "25", - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - }, - "cachedInput": { - "price": "0.5", - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - }, - "cacheWrite": { - "price": "6.25", - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - } - }, - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - }, - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - }, - "reasoning": { - "support": "supported", - "rawEfforts": [ - "low", - "medium", - "high", - "max" - ], - "selectableEfforts": [ - "low", - "medium", - "high", - "max" - ], - "mode": "optional", - "provenance": { - "authority": "maintained", - "source": "https://github.com/github/gh-aw-firewall/issues/10029 and https://github.com/github/gh-aw-firewall/issues/10030", - "revision": "issues-10029-10030-open-2026-10-20", - "at": "2026-10-15T17:11:28Z", - "confidence": "estimated" - } - } - } - }, - { - "key": "anthropic/claude-opus-4.7", - "baseline": { - "schemaVersion": 1, - "identity": { - "key": "anthropic/claude-opus-4.7", - "provider": "anthropic", - "rawId": "claude-opus-4.7", - "lookupId": "claude-opus-4-7" - }, - "lifecycle": { - "status": "active" - }, - "modelType": "other", - "importedPricing": { - "sourceNamespace": "anthropic", - "currency": "USD", - "unit": "USD_PER_1M_TOKENS", - "components": { - "input": { - "price": "5", - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - }, - "output": { - "price": "25", - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - }, - "cachedInput": { - "price": "0.5", - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - }, - "cacheWrite": { - "price": "6.25", - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - } - }, - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - }, - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - }, - "target": { - "schemaVersion": 1, - "identity": { - "key": "anthropic/claude-opus-4.7", - "provider": "anthropic", - "rawId": "claude-opus-4.7", - "lookupId": "claude-opus-4-7", - "family": "claude-opus-4" - }, - "lifecycle": { - "status": "active" - }, - "modelType": "other", - "importedPricing": { - "sourceNamespace": "anthropic", - "currency": "USD", - "unit": "USD_PER_1M_TOKENS", - "components": { - "input": { - "price": "5", - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - }, - "output": { - "price": "25", - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - }, - "cachedInput": { - "price": "0.5", - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - }, - "cacheWrite": { - "price": "6.25", - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - } - }, - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - }, - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - }, - "reasoning": { - "support": "supported", - "rawEfforts": [ - "low", - "medium", - "high", - "xhigh", - "max" - ], - "selectableEfforts": [ - "low", - "medium", - "high", - "xhigh", - "max" - ], - "mode": "optional", - "provenance": { - "authority": "maintained", - "source": "https://github.com/github/gh-aw-firewall/issues/10029 and https://github.com/github/gh-aw-firewall/issues/10030", - "revision": "issues-10029-10030-open-2026-10-20", - "at": "2026-10-15T17:11:28Z", - "confidence": "estimated" - } - } - } - }, - { - "key": "anthropic/claude-opus-4.8", - "baseline": { - "schemaVersion": 1, - "identity": { - "key": "anthropic/claude-opus-4.8", - "provider": "anthropic", - "rawId": "claude-opus-4.8", - "lookupId": "claude-opus-4-8" - }, - "lifecycle": { - "status": "active" - }, - "modelType": "other", - "importedPricing": { - "sourceNamespace": "anthropic", - "currency": "USD", - "unit": "USD_PER_1M_TOKENS", - "components": { - "input": { - "price": "5", - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - }, - "output": { - "price": "25", - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - }, - "cachedInput": { - "price": "0.5", - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - }, - "cacheWrite": { - "price": "6.25", - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - } - }, - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - }, - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - }, - "target": { - "schemaVersion": 1, - "identity": { - "key": "anthropic/claude-opus-4.8", - "provider": "anthropic", - "rawId": "claude-opus-4.8", - "lookupId": "claude-opus-4-8", - "family": "claude-opus-4" - }, - "lifecycle": { - "status": "active" - }, - "modelType": "other", - "importedPricing": { - "sourceNamespace": "anthropic", - "currency": "USD", - "unit": "USD_PER_1M_TOKENS", - "components": { - "input": { - "price": "5", - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - }, - "output": { - "price": "25", - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - }, - "cachedInput": { - "price": "0.5", - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - }, - "cacheWrite": { - "price": "6.25", - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - } - }, - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - }, - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - }, - "reasoning": { - "support": "supported", - "rawEfforts": [ - "low", - "medium", - "high", - "xhigh", - "max" - ], - "selectableEfforts": [ - "low", - "medium", - "high", - "xhigh", - "max" - ], - "mode": "optional", - "provenance": { - "authority": "maintained", - "source": "https://github.com/github/gh-aw-firewall/issues/10029 and https://github.com/github/gh-aw-firewall/issues/10030", - "revision": "issues-10029-10030-open-2026-10-20", - "at": "2026-10-15T17:11:28Z", - "confidence": "estimated" - } - } - } - }, { "key": "anthropic/claude-opus-5", "baseline": { @@ -3294,183 +2729,6 @@ ] } }, - { - "key": "openai/gpt-5.4-mini", - "baseline": { - "schemaVersion": 1, - "identity": { - "key": "openai/gpt-5.4-mini", - "provider": "openai", - "rawId": "gpt-5.4-mini", - "lookupId": "gpt-5-4-mini" - }, - "lifecycle": { - "status": "active" - }, - "modelType": "other", - "importedPricing": { - "sourceNamespace": "openai", - "currency": "USD", - "unit": "USD_PER_1M_TOKENS", - "components": { - "input": { - "price": "0.75", - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - }, - "output": { - "price": "4.5", - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - }, - "cachedInput": { - "price": "0.075", - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - } - }, - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - }, - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - }, - "target": { - "schemaVersion": 1, - "identity": { - "key": "openai/gpt-5.4-mini", - "provider": "openai", - "rawId": "gpt-5.4-mini", - "lookupId": "gpt-5-4-mini", - "family": "gpt-5.4-mini" - }, - "lifecycle": { - "status": "active" - }, - "modelType": "other", - "importedPricing": { - "sourceNamespace": "openai", - "currency": "USD", - "unit": "USD_PER_1M_TOKENS", - "components": { - "input": { - "price": "0.75", - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - }, - "output": { - "price": "4.5", - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - }, - "cachedInput": { - "price": "0.075", - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - } - }, - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - } - }, - "provenance": { - "authority": "imported", - "source": "https://openrouter.ai/api/v1/models", - "revision": "532616f47f24894fc4178ba865e239e328d0a0865418ba48d7e3644eb21c69b4", - "at": "2026-11-08T12:53:03.194Z", - "confidence": "imported", - "freshness": "unknown" - }, - "reasoning": { - "support": "supported", - "rawEfforts": [ - "none", - "low", - "medium", - "high", - "xhigh" - ], - "selectableEfforts": [ - "none", - "low", - "medium", - "high", - "xhigh" - ], - "mode": "optional", - "provenance": { - "authority": "maintained", - "source": "https://github.com/github/gh-aw-firewall/issues/10029 and https://github.com/github/gh-aw-firewall/issues/10030", - "revision": "issues-10029-10030-open-2026-10-20", - "at": "2026-10-15T17:11:28Z", - "confidence": "estimated" - } - }, - "limits": { - "contextTokens": 400000, - "provenance": { - "authority": "maintained", - "source": "https://github.com/github/gh-aw-firewall/issues/10029 and https://github.com/github/gh-aw-firewall/issues/10030", - "revision": "issues-10029-10030-open-2026-10-20", - "at": "2026-10-15T17:11:28Z", - "confidence": "estimated" - } - } - } - }, { "key": "openai/gpt-5.5", "baseline": { @@ -5343,7 +4601,7 @@ "baseline": { "title": "Model-to-API Endpoint Mapping", "description": "Maps AI model families to supported API endpoints and includes maintained task-routing effort/context metadata for selected model IDs.", - "lastUpdated": "2026-11-08T22:25:19Z", + "lastUpdated": "2026-11-09T00:10:26Z", "sources": { "openai": "https://developers.openai.com/api/docs/models", "openai_routing": "https://developers.openai.com/api/docs/models/gpt-5.4", @@ -5482,6 +4740,48 @@ ], "notes": "Supports both endpoints. Listed on the official GPT-5.5 model page. gpt-5.5-pro is responses-only (see separate entry above)." }, + { + "family": "gpt-5.4-mini", + "patterns": [ + "gpt-5.4-mini*" + ], + "routingPatterns": [ + "gpt-5.4-mini", + "gpt-5.4-mini-2026-03-17" + ], + "endpoints": [ + "chat_completions", + "responses" + ], + "routing": { + "reasoningEfforts": [ + "none", + "low", + "medium", + "high", + "xhigh" + ], + "contextWindowTokens": 400000, + "reasoningMode": "optional", + "defaultEffort": "none" + }, + "routingEvidence": { + "at": "2026-11-09T00:09:52.371Z", + "scope": { + "provider": "openai", + "channel": "native-api" + }, + "sources": [ + "https://developers.openai.com/api/docs/models/gpt-5.4-mini" + ], + "modelIds": [ + "gpt-5.4-mini", + "gpt-5.4-mini-2026-03-17" + ], + "conditions": "Native OpenAI API model-page window, not a guaranteed remaining input budget or a Copilot/Codex/custom-deployment limit. The page lists none (default), low, medium, high and xhigh and the recorded snapshot." + }, + "notes": "Independently reviewed GPT-5.4 mini effort/context facts; exact routing IDs only. No pro/cyber/research/preview/nano or future dated variants inherit them. Default is metadata, not request insertion." + }, { "family": "gpt-5.4", "patterns": [ @@ -5505,7 +4805,7 @@ ], "contextWindowTokens": 1050000 }, - "notes": "Supports both endpoints on OpenAI. GPT-5.4 routing metadata is exact-model only; mini/nano variants need separately verified data. The model page lists none, low, medium, high, and xhigh reasoning effort and a 1,050,000-token context window." + "notes": "Supports both endpoints on OpenAI. GPT-5.4 routing metadata is exact-model only; mini has separately reviewed data and nano remains unverified. The model page lists none, low, medium, high, and xhigh reasoning effort and a 1,050,000-token context window." }, { "family": "gpt-5.3-codex", @@ -5979,6 +5279,46 @@ }, "notes": "Best combination of speed and intelligence with verified 1M-token context windows and the Anthropic effort parameter." }, + { + "family": "claude-opus-4-6", + "patterns": [ + "claude-opus-4-6" + ], + "routingPatterns": [ + "claude-opus-4-6" + ], + "endpoints": [ + "messages" + ], + "routing": { + "reasoningEfforts": [ + "low", + "medium", + "high", + "max" + ], + "contextWindowTokens": 1000000, + "reasoningMode": "optional", + "defaultEffort": "high" + }, + "routingEvidence": { + "at": "2026-11-09T00:10:26.467Z", + "scope": { + "provider": "anthropic", + "channel": "native-api" + }, + "sources": [ + "https://platform.claude.com/docs/en/build-with-claude/effort", + "https://platform.claude.com/docs/en/build-with-claude/context-windows", + "https://github.com/anthropics/ClaudeForFoundationModels/blob/0262e1a766c461a4268dcec656eca95dd74cebf8/Sources/ClaudeForFoundationModels/ClaudeModel.swift" + ], + "modelIds": [ + "claude-opus-4-6" + ], + "conditions": "Top-level output_config.effort on the native Messages API; high is equivalent to omission. Opus 4.6 supports max but not xhigh. Native 1M total context is default without a beta header; request-size and output/thinking tokens still constrain usable input." + }, + "notes": "Reviewed Opus 4.6 separately from 4.7/4.8. No xhigh support; no inferred dated IDs or specialized variants. Default is metadata, not request insertion." + }, { "family": "claude-opus-4", "patterns": [ @@ -5986,8 +5326,7 @@ ], "routingPatterns": [ "claude-opus-4-8", - "claude-opus-4-7", - "claude-opus-4-6" + "claude-opus-4-7" ], "endpoints": [ "messages" @@ -5997,11 +5336,31 @@ "low", "medium", "high", + "xhigh", "max" ], - "contextWindowTokens": 1000000 + "contextWindowTokens": 1000000, + "reasoningMode": "optional", + "defaultEffort": "high" + }, + "routingEvidence": { + "at": "2026-11-09T00:10:26.467Z", + "scope": { + "provider": "anthropic", + "channel": "native-api" + }, + "sources": [ + "https://platform.claude.com/docs/en/build-with-claude/effort", + "https://platform.claude.com/docs/en/build-with-claude/context-windows", + "https://github.com/anthropics/ClaudeForFoundationModels/blob/0262e1a766c461a4268dcec656eca95dd74cebf8/Sources/ClaudeForFoundationModels/ClaudeModel.swift" + ], + "modelIds": [ + "claude-opus-4-7", + "claude-opus-4-8" + ], + "conditions": "Top-level output_config.effort on the native Messages API; high is equivalent to omission, while xhigh is a coding recommendation, not the default. Native 1M total context is default without a beta header; request-size and output/thinking tokens still constrain usable input." }, - "notes": "Opus 4.6 and newer models have verified 1M-token context windows and support the Anthropic effort parameter." + "notes": "Reviewed exact Opus 4.7/4.8 effort/context facts. Opus 4.6 has a separate negative-xhigh record; broad endpoint patterns do not grant routing support to other revisions." }, { "family": "claude-sonnet-4", @@ -6095,7 +5454,7 @@ "target": { "title": "Model-to-API Endpoint Mapping", "description": "Maps AI model families to supported API endpoints and includes maintained task-routing effort/context metadata for selected model IDs.", - "lastUpdated": "2026-11-08T22:25:19Z", + "lastUpdated": "2026-11-09T00:10:26Z", "sources": { "openai": "https://developers.openai.com/api/docs/models", "openai_routing": "https://developers.openai.com/api/docs/models/gpt-5.4", @@ -6324,14 +5683,14 @@ "patterns": [ "gpt-5.4-mini*" ], + "routingPatterns": [ + "gpt-5.4-mini", + "gpt-5.4-mini-2026-03-17" + ], "endpoints": [ "chat_completions", "responses" ], - "notes": "Exact reviewed mini routing; #10030.", - "routingPatterns": [ - "gpt-5.4-mini" - ], "routing": { "reasoningEfforts": [ "none", @@ -6340,8 +5699,26 @@ "high", "xhigh" ], - "contextWindowTokens": 400000 - } + "contextWindowTokens": 400000, + "reasoningMode": "optional", + "defaultEffort": "none" + }, + "routingEvidence": { + "at": "2026-11-09T00:09:52.371Z", + "scope": { + "provider": "openai", + "channel": "native-api" + }, + "sources": [ + "https://developers.openai.com/api/docs/models/gpt-5.4-mini" + ], + "modelIds": [ + "gpt-5.4-mini", + "gpt-5.4-mini-2026-03-17" + ], + "conditions": "Native OpenAI API model-page window, not a guaranteed remaining input budget or a Copilot/Codex/custom-deployment limit. The page lists none (default), low, medium, high and xhigh and the recorded snapshot." + }, + "notes": "Independently reviewed GPT-5.4 mini effort/context facts; exact routing IDs only. No pro/cyber/research/preview/nano or future dated variants inherit them. Default is metadata, not request insertion." }, { "family": "gpt-5.4", @@ -6366,7 +5743,7 @@ ], "contextWindowTokens": 1050000 }, - "notes": "Supports both endpoints on OpenAI. GPT-5.4 routing metadata is exact-model only; mini/nano variants need separately verified data. The model page lists none, low, medium, high, and xhigh reasoning effort and a 1,050,000-token context window." + "notes": "Supports both endpoints on OpenAI. GPT-5.4 routing metadata is exact-model only; mini has separately reviewed data and nano remains unverified. The model page lists none, low, medium, high, and xhigh reasoning effort and a 1,050,000-token context window." }, { "family": "gpt-5.3-codex", @@ -6872,12 +6249,12 @@ "patterns": [ "claude-opus-4-6" ], - "endpoints": [ - "messages" - ], "routingPatterns": [ "claude-opus-4-6" ], + "endpoints": [ + "messages" + ], "routing": { "reasoningEfforts": [ "low", @@ -6885,9 +6262,27 @@ "high", "max" ], - "contextWindowTokens": 1000000 + "contextWindowTokens": 1000000, + "reasoningMode": "optional", + "defaultEffort": "high" + }, + "routingEvidence": { + "at": "2026-11-09T00:10:26.467Z", + "scope": { + "provider": "anthropic", + "channel": "native-api" + }, + "sources": [ + "https://platform.claude.com/docs/en/build-with-claude/effort", + "https://platform.claude.com/docs/en/build-with-claude/context-windows", + "https://github.com/anthropics/ClaudeForFoundationModels/blob/0262e1a766c461a4268dcec656eca95dd74cebf8/Sources/ClaudeForFoundationModels/ClaudeModel.swift" + ], + "modelIds": [ + "claude-opus-4-6" + ], + "conditions": "Top-level output_config.effort on the native Messages API; high is equivalent to omission. Opus 4.6 supports max but not xhigh. Native 1M total context is default without a beta header; request-size and output/thinking tokens still constrain usable input." }, - "notes": "Opus 4.6 does not support xhigh; #10030." + "notes": "Reviewed Opus 4.6 separately from 4.7/4.8. No xhigh support; no inferred dated IDs or specialized variants. Default is metadata, not request insertion." }, { "family": "claude-opus-4", @@ -6909,9 +6304,28 @@ "xhigh", "max" ], - "contextWindowTokens": 1000000 + "contextWindowTokens": 1000000, + "reasoningMode": "optional", + "defaultEffort": "high" + }, + "routingEvidence": { + "at": "2026-11-09T00:10:26.467Z", + "scope": { + "provider": "anthropic", + "channel": "native-api" + }, + "sources": [ + "https://platform.claude.com/docs/en/build-with-claude/effort", + "https://platform.claude.com/docs/en/build-with-claude/context-windows", + "https://github.com/anthropics/ClaudeForFoundationModels/blob/0262e1a766c461a4268dcec656eca95dd74cebf8/Sources/ClaudeForFoundationModels/ClaudeModel.swift" + ], + "modelIds": [ + "claude-opus-4-7", + "claude-opus-4-8" + ], + "conditions": "Top-level output_config.effort on the native Messages API; high is equivalent to omission, while xhigh is a coding recommendation, not the default. Native 1M total context is default without a beta header; request-size and output/thinking tokens still constrain usable input." }, - "notes": "Opus 4.6 and newer models have verified 1M-token context windows and support the Anthropic effort parameter." + "notes": "Reviewed exact Opus 4.7/4.8 effort/context facts. Opus 4.6 has a separate negative-xhigh record; broad endpoint patterns do not grant routing support to other revisions." }, { "family": "claude-sonnet-4", diff --git a/shared/model-information/catalog.generated.json b/shared/model-information/catalog.generated.json index afc72a1fe..2093a01ce 100644 --- a/shared/model-information/catalog.generated.json +++ b/shared/model-information/catalog.generated.json @@ -1,7 +1,7 @@ { "schemaVersion": 1, - "catalogRevision": "c00be1b161139479fc9ce4e6f7dc9786cc864588261cb4152a812a82a62a5829", - "generatedAt": "2026-11-08T22:25:19.000Z", + "catalogRevision": "8b85e0ae761c3e9c971f3c3018349cb5ae6aec731ae7aefb94ebe9255826799a", + "generatedAt": "2026-11-09T00:10:26.000Z", "models": [ { "schemaVersion": 1, diff --git a/shared/model-information/manifest.generated.json b/shared/model-information/manifest.generated.json index e233fe602..9b7c5be29 100644 --- a/shared/model-information/manifest.generated.json +++ b/shared/model-information/manifest.generated.json @@ -2,8 +2,8 @@ "schemaVersion": 1, "compilerVersion": 8, "schemaHash": "df9780a1fd9a1418ec8d99cb4aaf27d49bda9c8a08d157036c6893798c64f479", - "catalogRevision": "c00be1b161139479fc9ce4e6f7dc9786cc864588261cb4152a812a82a62a5829", - "generatedAt": "2026-11-08T22:25:19.000Z", + "catalogRevision": "8b85e0ae761c3e9c971f3c3018349cb5ae6aec731ae7aefb94ebe9255826799a", + "generatedAt": "2026-11-09T00:10:26.000Z", "sourceFiles": [ "shared/model-information/sources/copilot-claude.json", "shared/model-information/sources/copilot-gemini.json", diff --git a/shared/model-information/sources/mapping.json b/shared/model-information/sources/mapping.json index 6e011362a..e4a43cbd4 100644 --- a/shared/model-information/sources/mapping.json +++ b/shared/model-information/sources/mapping.json @@ -2,15 +2,15 @@ "schemaVersion": 1, "provenance": { "authority": "maintained", - "source": "docs/model-api-mapping.json", - "revision": "decisions-endpoint-conventions-v1", - "at": "2026-11-08T22:25:19Z", + "source": "https://github.com/github/gh-aw-firewall/issues/11330", + "revision": "reviewed-native-mini-opus4-2026-11-09", + "at": "2026-11-09T00:10:26Z", "confidence": "estimated" }, "mapping": { "title": "Model-to-API Endpoint Mapping", "description": "Maps AI model families to supported API endpoints and includes maintained task-routing effort/context metadata for selected model IDs.", - "lastUpdated": "2026-11-08T22:25:19Z", + "lastUpdated": "2026-11-09T00:10:26Z", "sources": { "openai": "https://developers.openai.com/api/docs/models", "openai_routing": "https://developers.openai.com/api/docs/models/gpt-5.4", @@ -149,6 +149,48 @@ ], "notes": "Supports both endpoints. Listed on the official GPT-5.5 model page. gpt-5.5-pro is responses-only (see separate entry above)." }, + { + "family": "gpt-5.4-mini", + "patterns": [ + "gpt-5.4-mini*" + ], + "routingPatterns": [ + "gpt-5.4-mini", + "gpt-5.4-mini-2026-03-17" + ], + "endpoints": [ + "chat_completions", + "responses" + ], + "routing": { + "reasoningEfforts": [ + "none", + "low", + "medium", + "high", + "xhigh" + ], + "contextWindowTokens": 400000, + "reasoningMode": "optional", + "defaultEffort": "none" + }, + "routingEvidence": { + "at": "2026-11-09T00:09:52.371Z", + "scope": { + "provider": "openai", + "channel": "native-api" + }, + "sources": [ + "https://developers.openai.com/api/docs/models/gpt-5.4-mini" + ], + "modelIds": [ + "gpt-5.4-mini", + "gpt-5.4-mini-2026-03-17" + ], + "conditions": "Native OpenAI API model-page window, not a guaranteed remaining input budget or a Copilot/Codex/custom-deployment limit. The page lists none (default), low, medium, high and xhigh and the recorded snapshot." + }, + "notes": "Independently reviewed GPT-5.4 mini effort/context facts; exact routing IDs only. No pro/cyber/research/preview/nano or future dated variants inherit them. Default is metadata, not request insertion." + }, { "family": "gpt-5.4", "patterns": [ @@ -172,7 +214,7 @@ ], "contextWindowTokens": 1050000 }, - "notes": "Supports both endpoints on OpenAI. GPT-5.4 routing metadata is exact-model only; mini/nano variants need separately verified data. The model page lists none, low, medium, high, and xhigh reasoning effort and a 1,050,000-token context window." + "notes": "Supports both endpoints on OpenAI. GPT-5.4 routing metadata is exact-model only; mini has separately reviewed data and nano remains unverified. The model page lists none, low, medium, high, and xhigh reasoning effort and a 1,050,000-token context window." }, { "family": "gpt-5.3-codex", @@ -586,6 +628,46 @@ }, "notes": "Best combination of speed and intelligence with verified 1M-token context windows and the Anthropic effort parameter." }, + { + "family": "claude-opus-4-6", + "patterns": [ + "claude-opus-4-6" + ], + "routingPatterns": [ + "claude-opus-4-6" + ], + "endpoints": [ + "messages" + ], + "routing": { + "reasoningEfforts": [ + "low", + "medium", + "high", + "max" + ], + "contextWindowTokens": 1000000, + "reasoningMode": "optional", + "defaultEffort": "high" + }, + "routingEvidence": { + "at": "2026-11-09T00:10:26.467Z", + "scope": { + "provider": "anthropic", + "channel": "native-api" + }, + "sources": [ + "https://platform.claude.com/docs/en/build-with-claude/effort", + "https://platform.claude.com/docs/en/build-with-claude/context-windows", + "https://github.com/anthropics/ClaudeForFoundationModels/blob/0262e1a766c461a4268dcec656eca95dd74cebf8/Sources/ClaudeForFoundationModels/ClaudeModel.swift" + ], + "modelIds": [ + "claude-opus-4-6" + ], + "conditions": "Top-level output_config.effort on the native Messages API; high is equivalent to omission. Opus 4.6 supports max but not xhigh. Native 1M total context is default without a beta header; request-size and output/thinking tokens still constrain usable input." + }, + "notes": "Reviewed Opus 4.6 separately from 4.7/4.8. No xhigh support; no inferred dated IDs or specialized variants. Default is metadata, not request insertion." + }, { "family": "claude-opus-4", "patterns": [ @@ -593,8 +675,7 @@ ], "routingPatterns": [ "claude-opus-4-8", - "claude-opus-4-7", - "claude-opus-4-6" + "claude-opus-4-7" ], "endpoints": [ "messages" @@ -604,11 +685,31 @@ "low", "medium", "high", + "xhigh", "max" ], - "contextWindowTokens": 1000000 + "contextWindowTokens": 1000000, + "reasoningMode": "optional", + "defaultEffort": "high" + }, + "routingEvidence": { + "at": "2026-11-09T00:10:26.467Z", + "scope": { + "provider": "anthropic", + "channel": "native-api" + }, + "sources": [ + "https://platform.claude.com/docs/en/build-with-claude/effort", + "https://platform.claude.com/docs/en/build-with-claude/context-windows", + "https://github.com/anthropics/ClaudeForFoundationModels/blob/0262e1a766c461a4268dcec656eca95dd74cebf8/Sources/ClaudeForFoundationModels/ClaudeModel.swift" + ], + "modelIds": [ + "claude-opus-4-7", + "claude-opus-4-8" + ], + "conditions": "Top-level output_config.effort on the native Messages API; high is equivalent to omission, while xhigh is a coding recommendation, not the default. Native 1M total context is default without a beta header; request-size and output/thinking tokens still constrain usable input." }, - "notes": "Opus 4.6 and newer models have verified 1M-token context windows and support the Anthropic effort parameter." + "notes": "Reviewed exact Opus 4.7/4.8 effort/context facts. Opus 4.6 has a separate negative-xhigh record; broad endpoint patterns do not grant routing support to other revisions." }, { "family": "claude-sonnet-4", diff --git a/shared/model-information/sources/target.json b/shared/model-information/sources/target.json index adf51d8e1..0675995f0 100644 --- a/shared/model-information/sources/target.json +++ b/shared/model-information/sources/target.json @@ -63,19 +63,6 @@ } }, "routing": [ - { - "provider": "openai", - "id": "gpt-5.4-mini", - "family": "gpt-5.4-mini", - "context": 400000, - "efforts": [ - "none", - "low", - "medium", - "high", - "xhigh" - ] - }, { "provider": "openai", "id": "gpt-5.5", @@ -306,41 +293,6 @@ "max" ] }, - { - "provider": "anthropic", - "id": "claude-opus-4.8", - "family": "claude-opus-4", - "efforts": [ - "low", - "medium", - "high", - "xhigh", - "max" - ] - }, - { - "provider": "anthropic", - "id": "claude-opus-4.7", - "family": "claude-opus-4", - "efforts": [ - "low", - "medium", - "high", - "xhigh", - "max" - ] - }, - { - "provider": "anthropic", - "id": "claude-opus-4.6", - "family": "claude-opus-4", - "efforts": [ - "low", - "medium", - "high", - "max" - ] - }, { "provider": "anthropic", "id": "claude-sonnet-4.6", diff --git a/shared/model-information/target.generated.json b/shared/model-information/target.generated.json index d85a92293..2ea2b4d22 100644 --- a/shared/model-information/target.generated.json +++ b/shared/model-information/target.generated.json @@ -1,7 +1,7 @@ { "schemaVersion": 1, - "catalogRevision": "c00be1b161139479fc9ce4e6f7dc9786cc864588261cb4152a812a82a62a5829", - "generatedAt": "2026-11-08T22:25:19.000Z", + "catalogRevision": "8b85e0ae761c3e9c971f3c3018349cb5ae6aec731ae7aefb94ebe9255826799a", + "generatedAt": "2026-11-09T00:10:26.000Z", "models": [ { "schemaVersion": 1, @@ -1966,8 +1966,7 @@ "key": "anthropic/claude-opus-4.6", "provider": "anthropic", "rawId": "claude-opus-4.6", - "lookupId": "claude-opus-4-6", - "family": "claude-opus-4" + "lookupId": "claude-opus-4-6" }, "lifecycle": { "status": "active" @@ -2039,29 +2038,6 @@ "at": "2026-11-08T12:53:03.194Z", "confidence": "imported", "freshness": "unknown" - }, - "reasoning": { - "support": "supported", - "rawEfforts": [ - "low", - "medium", - "high", - "max" - ], - "selectableEfforts": [ - "low", - "medium", - "high", - "max" - ], - "mode": "optional", - "provenance": { - "authority": "maintained", - "source": "https://github.com/github/gh-aw-firewall/issues/10029 and https://github.com/github/gh-aw-firewall/issues/10030", - "revision": "issues-10029-10030-open-2026-10-20", - "at": "2026-10-15T17:11:28Z", - "confidence": "estimated" - } } }, { @@ -2150,8 +2126,7 @@ "key": "anthropic/claude-opus-4.7", "provider": "anthropic", "rawId": "claude-opus-4.7", - "lookupId": "claude-opus-4-7", - "family": "claude-opus-4" + "lookupId": "claude-opus-4-7" }, "lifecycle": { "status": "active" @@ -2223,31 +2198,6 @@ "at": "2026-11-08T12:53:03.194Z", "confidence": "imported", "freshness": "unknown" - }, - "reasoning": { - "support": "supported", - "rawEfforts": [ - "low", - "medium", - "high", - "xhigh", - "max" - ], - "selectableEfforts": [ - "low", - "medium", - "high", - "xhigh", - "max" - ], - "mode": "optional", - "provenance": { - "authority": "maintained", - "source": "https://github.com/github/gh-aw-firewall/issues/10029 and https://github.com/github/gh-aw-firewall/issues/10030", - "revision": "issues-10029-10030-open-2026-10-20", - "at": "2026-10-15T17:11:28Z", - "confidence": "estimated" - } } }, { @@ -2336,8 +2286,7 @@ "key": "anthropic/claude-opus-4.8", "provider": "anthropic", "rawId": "claude-opus-4.8", - "lookupId": "claude-opus-4-8", - "family": "claude-opus-4" + "lookupId": "claude-opus-4-8" }, "lifecycle": { "status": "active" @@ -2409,31 +2358,6 @@ "at": "2026-11-08T12:53:03.194Z", "confidence": "imported", "freshness": "unknown" - }, - "reasoning": { - "support": "supported", - "rawEfforts": [ - "low", - "medium", - "high", - "xhigh", - "max" - ], - "selectableEfforts": [ - "low", - "medium", - "high", - "xhigh", - "max" - ], - "mode": "optional", - "provenance": { - "authority": "maintained", - "source": "https://github.com/github/gh-aw-firewall/issues/10029 and https://github.com/github/gh-aw-firewall/issues/10030", - "revision": "issues-10029-10030-open-2026-10-20", - "at": "2026-10-15T17:11:28Z", - "confidence": "estimated" - } } }, { @@ -23002,8 +22926,7 @@ "key": "openai/gpt-5.4-mini", "provider": "openai", "rawId": "gpt-5.4-mini", - "lookupId": "gpt-5-4-mini", - "family": "gpt-5.4-mini" + "lookupId": "gpt-5-4-mini" }, "lifecycle": { "status": "active" @@ -23064,41 +22987,6 @@ "at": "2026-11-08T12:53:03.194Z", "confidence": "imported", "freshness": "unknown" - }, - "reasoning": { - "support": "supported", - "rawEfforts": [ - "none", - "low", - "medium", - "high", - "xhigh" - ], - "selectableEfforts": [ - "none", - "low", - "medium", - "high", - "xhigh" - ], - "mode": "optional", - "provenance": { - "authority": "maintained", - "source": "https://github.com/github/gh-aw-firewall/issues/10029 and https://github.com/github/gh-aw-firewall/issues/10030", - "revision": "issues-10029-10030-open-2026-10-20", - "at": "2026-10-15T17:11:28Z", - "confidence": "estimated" - } - }, - "limits": { - "contextTokens": 400000, - "provenance": { - "authority": "maintained", - "source": "https://github.com/github/gh-aw-firewall/issues/10029 and https://github.com/github/gh-aw-firewall/issues/10030", - "revision": "issues-10029-10030-open-2026-10-20", - "at": "2026-10-15T17:11:28Z", - "confidence": "estimated" - } } }, { diff --git a/src/copilot-model-catalog-sync.test.ts b/src/copilot-model-catalog-sync.test.ts index 40015a0c3..fd6279102 100644 --- a/src/copilot-model-catalog-sync.test.ts +++ b/src/copilot-model-catalog-sync.test.ts @@ -112,6 +112,7 @@ const MAPPING_FAMILIES_NOT_EXPOSED_BY_COPILOT_CLI = new Set([ 'claude-3-5-haiku', 'claude-3-7-sonnet', 'claude-3-opus', + 'claude-opus-4-6', // Exact native Opus 4.6 routing record, not a new Copilot CLI model. 'claude-haiku-5', // API mapping covers this family; it is not in the Copilot CLI model picker. ]); @@ -203,7 +204,6 @@ describe('SUPPORTED_COPILOT_MODELS ↔ ai-credits-pricing catalog sync', () => { 'gpt-6.1-sol', ] .filter(family => !openai.find(entry => entry.family === family)?.routing)).toEqual([ - 'gpt-5.4-mini', 'gpt-5.5', 'gpt-5.6', 'gpt-5.6-sol', @@ -231,8 +231,6 @@ describe('SUPPORTED_COPILOT_MODELS ↔ ai-credits-pricing catalog sync', () => { 'claude-opus-5-5', 'claude-sonnet-5', 'claude-sonnet-5-5', - 'claude-opus-4-7', - 'claude-opus-4-8', ]; expect(missingXhigh.map(model => { const entry = mapping.providers.anthropic.models.find(candidate =>