@@ -16,7 +16,6 @@ import {
1616 PROVIDER_DEFINITIONS ,
1717 supportsForcedToolUse ,
1818 updateFireworksModels ,
19- updateOpenRouterModels ,
2019} from '@/providers/models'
2120import { supportsPromptCaching } from '@/providers/utils'
2221
@@ -65,57 +64,14 @@ describe('catalog featured model metadata', () => {
6564} )
6665
6766describe ( 'forced tool use capability' , ( ) => {
68- it ( 'keeps Auto and None support when a model disables Force' , ( ) => {
69- expect ( getModelCapabilities ( 'claude-fable-5-1' ) ) . toMatchObject ( {
70- toolUsageControl : true ,
71- forcedToolUse : false ,
72- } )
73- } )
74-
75- it . each ( [
76- 'claude-fable-5-1' ,
77- 'CLAUDE-FABLE-5-1-20260901' ,
78- 'azure-anthropic/claude-fable-5-1' ,
79- 'azure-anthropic/claude-fable-5-1-20260901' ,
80- 'bedrock/anthropic.claude-fable-5-1-v1:0' ,
81- 'claude-mythos-5-1' ,
82- 'claude-mythos-5-1-20260901' ,
83- ] ) ( 'disables forced tool use for %s' , ( model ) => {
84- expect ( getModelCapabilities ( model ) ) . toMatchObject ( {
85- toolUsageControl : true ,
86- forcedToolUse : false ,
87- } )
88- expect ( supportsForcedToolUse ( model ) ) . toBe ( false )
89- } )
90-
91- it ( 'adds only known alias capabilities to provider defaults' , ( ) => {
92- expect ( getModelCapabilities ( 'claude-mythos-5-1' ) ) . toEqual ( {
93- ...PROVIDER_DEFINITIONS . anthropic . capabilities ,
94- forcedToolUse : false ,
95- } )
96- } )
97-
98- it ( 'inherits alias capabilities for dynamic models and respects explicit overrides' , ( ) => {
99- const originalModels = PROVIDER_DEFINITIONS . openrouter . models
100- const modelId = 'anthropic/claude-fable-5-1'
101- try {
102- updateOpenRouterModels ( [ modelId ] )
103- expect ( getModelCapabilities ( modelId ) ?. forcedToolUse ) . toBe ( false )
104- expect ( supportsForcedToolUse ( modelId ) ) . toBe ( false )
105-
106- PROVIDER_DEFINITIONS . openrouter . models [ 0 ] . capabilities . forcedToolUse = true
107- expect ( getModelCapabilities ( modelId ) ?. forcedToolUse ) . toBe ( true )
108- expect ( supportsForcedToolUse ( modelId ) ) . toBe ( true )
109- } finally {
110- PROVIDER_DEFINITIONS . openrouter . models = originalModels
111- }
112- } )
113-
114- it . each ( [ 'claude-fable-5-10' , 'claude-mythos-5-10' , 'claude-not-fable-5-1' ] ) (
115- 'does not apply alias restrictions to unrelated model %s' ,
67+ it . each ( [ 'claude-fable-5-1' , 'CLAUDE-FABLE-5-1' ] ) (
68+ 'disables Force while keeping Auto and None support for %s' ,
11669 ( model ) => {
117- expect ( getModelCapabilities ( model ) ) . toEqual ( PROVIDER_DEFINITIONS . anthropic . capabilities )
118- expect ( supportsForcedToolUse ( model ) ) . toBe ( true )
70+ expect ( getModelCapabilities ( model ) ) . toMatchObject ( {
71+ toolUsageControl : true ,
72+ forcedToolUse : false ,
73+ } )
74+ expect ( supportsForcedToolUse ( model ) ) . toBe ( false )
11975 }
12076 )
12177
0 commit comments