File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,8 +20,22 @@ export const GET: RequestHandler = async ({ request }) => {
2020 const key = `nanogpt:${ model . id } ` ;
2121 const enabledModel = enabledModelsMap [ key ] ;
2222
23+ // Check capabilities based on architecture if not explicitly set
24+ const outputModalities = model . architecture ?. output_modalities || [ ] ;
25+
26+ const capabilities = {
27+ vision : model . capabilities ?. vision ?? false ,
28+ reasoning : model . capabilities ?. reasoning ?? false ,
29+ // Add explicit image/video generation capabilities
30+ images : outputModalities . includes ( 'image' ) && outputModalities . length === 1 ,
31+ video : outputModalities . includes ( 'video' ) ,
32+ } ;
33+
2334 return {
2435 ...model ,
36+ capabilities,
37+ // Ensure subscription info is always present with defaults
38+ subscription : model . subscription || { included : false , note : '' } ,
2539 enabled : ! ! enabledModel ,
2640 pinned : enabledModel ?. pinned ?? false ,
2741 } ;
You can’t perform that action at this time.
0 commit comments