@@ -64,14 +64,12 @@ export type ModelCatalogItem = {
6464 description : string | null ;
6565 contextWindow : number | null ;
6666 maxOutputTokens : number | null ;
67- capabilities : string [ ] ;
67+ /** Combined capabilities (from DB) and boolean feature flags (from catalog) as slug strings. */
68+ features : string [ ] ;
6869 inputPrice : number | null ;
6970 outputPrice : number | null ;
7071 /** When the model was publicly released (from startDate on LlmModel). */
7172 releaseDate : string | null ;
72- supportsStructuredOutput : boolean ;
73- supportsParallelToolCalls : boolean ;
74- supportsStreamingToolCalls : boolean ;
7573 /** Dated variants of this model (only populated on base models). */
7674 variants : ModelVariant [ ] ;
7775} ;
@@ -98,6 +96,17 @@ export type ModelDetail = ModelCatalogItem & {
9896 } > ;
9997} ;
10098
99+ function buildFeatures (
100+ capabilities : string [ ] ,
101+ catalogEntry : { supportsStructuredOutput : boolean ; supportsParallelToolCalls : boolean ; supportsStreamingToolCalls : boolean } | undefined
102+ ) : string [ ] {
103+ const features = [ ...capabilities ] ;
104+ if ( catalogEntry ?. supportsStructuredOutput ) features . push ( "structured_output" ) ;
105+ if ( catalogEntry ?. supportsParallelToolCalls ) features . push ( "parallel_tool_calls" ) ;
106+ if ( catalogEntry ?. supportsStreamingToolCalls ) features . push ( "streaming_tool_calls" ) ;
107+ return features ;
108+ }
109+
101110export type ModelMetricsPoint = {
102111 minute : string ;
103112 callCount : number ;
@@ -214,13 +223,10 @@ export class ModelRegistryPresenter extends BasePresenter {
214223 description : m . description ,
215224 contextWindow : m . contextWindow ,
216225 maxOutputTokens : m . maxOutputTokens ,
217- capabilities : m . capabilities ,
226+ features : buildFeatures ( m . capabilities , catalogEntry ) ,
218227 inputPrice : inputPrice ? Number ( inputPrice . price ) : null ,
219228 outputPrice : outputPrice ? Number ( outputPrice . price ) : null ,
220229 releaseDate : m . startDate ? m . startDate . toISOString ( ) . split ( "T" ) [ 0 ] : null ,
221- supportsStructuredOutput : catalogEntry ?. supportsStructuredOutput ?? false ,
222- supportsParallelToolCalls : catalogEntry ?. supportsParallelToolCalls ?? false ,
223- supportsStreamingToolCalls : catalogEntry ?. supportsStreamingToolCalls ?? false ,
224230 variants : [ ] ,
225231 _baseModelName : m . baseModelName ,
226232 } ;
@@ -331,13 +337,10 @@ export class ModelRegistryPresenter extends BasePresenter {
331337 description : model . description ,
332338 contextWindow : model . contextWindow ,
333339 maxOutputTokens : model . maxOutputTokens ,
334- capabilities : model . capabilities ,
340+ features : buildFeatures ( model . capabilities , catalogEntry ) ,
335341 inputPrice : inputPrice ? Number ( inputPrice . price ) : null ,
336342 outputPrice : outputPrice ? Number ( outputPrice . price ) : null ,
337343 releaseDate : model . startDate ? model . startDate . toISOString ( ) . split ( "T" ) [ 0 ] : null ,
338- supportsStructuredOutput : catalogEntry ?. supportsStructuredOutput ?? false ,
339- supportsParallelToolCalls : catalogEntry ?. supportsParallelToolCalls ?? false ,
340- supportsStreamingToolCalls : catalogEntry ?. supportsStreamingToolCalls ?? false ,
341344 variants : [ ] ,
342345 matchPattern : model . matchPattern ,
343346 source : model . source ,
0 commit comments