@@ -730,77 +730,28 @@ export namespace Config {
730730 } )
731731 export type Layout = z . infer < typeof Layout >
732732
733- export const Model = z
734- . object ( {
735- id : z . string ( ) ,
736- name : z . string ( ) ,
737- family : z . string ( ) . optional ( ) ,
738- release_date : z . string ( ) ,
739- attachment : z . boolean ( ) ,
740- reasoning : z . boolean ( ) ,
741- temperature : z . boolean ( ) ,
742- tool_call : z . boolean ( ) ,
743- interleaved : z
744- . union ( [
745- z . literal ( true ) ,
746- z
747- . object ( {
748- field : z . enum ( [ "reasoning_content" , "reasoning_details" ] ) ,
749- } )
750- . strict ( ) ,
751- ] )
752- . optional ( ) ,
753- cost : z
754- . object ( {
755- input : z . number ( ) ,
756- output : z . number ( ) ,
757- cache_read : z . number ( ) . optional ( ) ,
758- cache_write : z . number ( ) . optional ( ) ,
759- context_over_200k : z
760- . object ( {
761- input : z . number ( ) ,
762- output : z . number ( ) ,
763- cache_read : z . number ( ) . optional ( ) ,
764- cache_write : z . number ( ) . optional ( ) ,
765- } )
766- . optional ( ) ,
767- } )
768- . optional ( ) ,
769- limit : z . object ( {
770- context : z . number ( ) ,
771- input : z . number ( ) . optional ( ) ,
772- output : z . number ( ) ,
773- } ) ,
774- modalities : z
775- . object ( {
776- input : z . array ( z . enum ( [ "text" , "audio" , "image" , "video" , "pdf" ] ) ) ,
777- output : z . array ( z . enum ( [ "text" , "audio" , "image" , "video" , "pdf" ] ) ) ,
778- } )
779- . optional ( ) ,
780- experimental : z . boolean ( ) . optional ( ) ,
781- status : z . enum ( [ "alpha" , "beta" , "deprecated" ] ) . optional ( ) ,
782- options : z . record ( z . string ( ) , z . any ( ) ) ,
783- headers : z . record ( z . string ( ) , z . string ( ) ) . optional ( ) ,
784- provider : z . object ( { npm : z . string ( ) . optional ( ) , api : z . string ( ) . optional ( ) } ) . optional ( ) ,
785- variants : z
786- . record (
787- z . string ( ) ,
788- z
789- . object ( {
790- disabled : z . boolean ( ) . optional ( ) . describe ( "Disable this variant for the model" ) ,
791- } )
792- . catchall ( z . any ( ) ) ,
793- )
794- . optional ( )
795- . describe ( "Variant-specific configuration" ) ,
796- } )
797- . partial ( )
798-
799733 export const Provider = ModelsDev . Provider . partial ( )
800734 . extend ( {
801735 whitelist : z . array ( z . string ( ) ) . optional ( ) ,
802736 blacklist : z . array ( z . string ( ) ) . optional ( ) ,
803- models : z . record ( z . string ( ) , Model ) . optional ( ) ,
737+ models : z
738+ . record (
739+ z . string ( ) ,
740+ ModelsDev . Model . partial ( ) . extend ( {
741+ variants : z
742+ . record (
743+ z . string ( ) ,
744+ z
745+ . object ( {
746+ disabled : z . boolean ( ) . optional ( ) . describe ( "Disable this variant for the model" ) ,
747+ } )
748+ . catchall ( z . any ( ) ) ,
749+ )
750+ . optional ( )
751+ . describe ( "Variant-specific configuration" ) ,
752+ } ) ,
753+ )
754+ . optional ( ) ,
804755 options : z
805756 . object ( {
806757 apiKey : z . string ( ) . optional ( ) ,
0 commit comments