File tree Expand file tree Collapse file tree
dashboard/src/composables Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -134,11 +134,26 @@ export function useProviderSources(options: UseProviderSourcesOptions) {
134134 } )
135135 } )
136136
137+ function buildMetadataFromProvider ( provider : any ) {
138+ if ( ! provider ) return null
139+ const mods = provider . modalities || [ ]
140+ if ( ! mods . length && ! provider . max_context_tokens ) return null
141+ const input : string [ ] = [ ]
142+ if ( mods . includes ( 'image' ) ) input . push ( 'image' )
143+ if ( mods . includes ( 'audio' ) ) input . push ( 'audio' )
144+ return {
145+ modalities : { input } ,
146+ tool_call : mods . includes ( 'tool_use' ) ,
147+ reasoning : Boolean ( provider . reasoning ) ,
148+ limit : { context : provider . max_context_tokens || 0 }
149+ }
150+ }
151+
137152 const mergedModelEntries = computed ( ( ) => {
138153 const configuredEntries = ( sourceProviders . value || [ ] ) . map ( ( provider : any ) => ( {
139154 type : 'configured' ,
140155 provider,
141- metadata : getModelMetadata ( provider . model )
156+ metadata : getModelMetadata ( provider . model ) || buildMetadataFromProvider ( provider )
142157 } ) )
143158
144159 const availableEntries = ( sortedAvailableModels . value || [ ] )
@@ -575,7 +590,8 @@ export function useProviderSources(options: UseProviderSourcesOptions) {
575590 model : modelName ,
576591 modalities,
577592 custom_extra_body : { } ,
578- max_context_tokens : max_context_tokens
593+ max_context_tokens : max_context_tokens ,
594+ reasoning : supportsReasoning ( metadata )
579595 }
580596 }
581597
You can’t perform that action at this time.
0 commit comments