@@ -7,7 +7,21 @@ export const Model = z
77 attachment : z . boolean ( ) ,
88 reasoning : z . boolean ( ) ,
99 temperature : z . boolean ( ) ,
10- tool_call : z . boolean ( ) ,
10+ tool_call : z
11+ . union ( [
12+ z . boolean ( ) ,
13+ z
14+ . object ( {
15+ supported : z . boolean ( ) ,
16+ streaming : z . boolean ( ) . optional ( ) ,
17+ parallel : z . boolean ( ) . optional ( ) ,
18+ coerces_types : z . boolean ( ) . optional ( ) ,
19+ } )
20+ . strict ( ) ,
21+ ] )
22+ . describe (
23+ "Supports tool calling. Can be a boolean or an object for granular capabilities." ,
24+ ) ,
1125 knowledge : z
1226 . string ( )
1327 . regex ( / ^ \d { 4 } - \d { 2 } ( - \d { 2 } ) ? $ / , {
@@ -71,7 +85,7 @@ export const Model = z
7185 {
7286 message : "Cannot set cost.reasoning when reasoning is false" ,
7387 path : [ "cost" , "reasoning" ] ,
74- }
88+ } ,
7589 ) ;
7690
7791export type Model = z . infer < typeof Model > ;
@@ -87,7 +101,7 @@ export const Provider = z
87101 . string ( )
88102 . min (
89103 1 ,
90- "Please provide a link to the provider documentation where models are listed"
104+ "Please provide a link to the provider documentation where models are listed" ,
91105 ) ,
92106 models : z . record ( Model ) ,
93107 } )
@@ -103,6 +117,6 @@ export const Provider = z
103117 message :
104118 "'api' field is required if and only if npm is '@ai-sdk/openai-compatible'" ,
105119 path : [ "api" ] ,
106- }
120+ } ,
107121 ) ;
108122export type Provider = z . infer < typeof Provider > ;
0 commit comments