@@ -7,7 +7,20 @@ 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+ coerces_types : z . boolean ( ) . optional ( ) ,
18+ } )
19+ . strict ( ) ,
20+ ] )
21+ . describe (
22+ "Supports tool calling. Can be a boolean or an object for granular capabilities." ,
23+ ) ,
1124 knowledge : z
1225 . string ( )
1326 . regex ( / ^ \d { 4 } - \d { 2 } ( - \d { 2 } ) ? $ / , {
@@ -71,7 +84,7 @@ export const Model = z
7184 {
7285 message : "Cannot set cost.reasoning when reasoning is false" ,
7386 path : [ "cost" , "reasoning" ] ,
74- }
87+ } ,
7588 ) ;
7689
7790export type Model = z . infer < typeof Model > ;
@@ -87,7 +100,7 @@ export const Provider = z
87100 . string ( )
88101 . min (
89102 1 ,
90- "Please provide a link to the provider documentation where models are listed"
103+ "Please provide a link to the provider documentation where models are listed" ,
91104 ) ,
92105 models : z . record ( Model ) ,
93106 } )
@@ -103,6 +116,6 @@ export const Provider = z
103116 message :
104117 "'api' field is required if and only if npm is '@ai-sdk/openai-compatible'" ,
105118 path : [ "api" ] ,
106- }
119+ } ,
107120 ) ;
108121export type Provider = z . infer < typeof Provider > ;
0 commit comments