@@ -33,6 +33,8 @@ import { proxied } from "@/util/proxied"
3333import { iife } from "@/util/iife"
3434
3535export namespace Config {
36+ const ModelId = z . string ( ) . meta ( { $ref : "https://models.dev/model-schema.json#/$defs/Model" } )
37+
3638 const log = Log . create ( { service : "config" } )
3739
3840 // Managed settings directory for enterprise deployments (highest priority, admin-controlled)
@@ -653,7 +655,7 @@ export namespace Config {
653655 template : z . string ( ) ,
654656 description : z . string ( ) . optional ( ) ,
655657 agent : z . string ( ) . optional ( ) ,
656- model : z . string ( ) . optional ( ) ,
658+ model : ModelId . optional ( ) ,
657659 subtask : z . boolean ( ) . optional ( ) ,
658660 } )
659661 export type Command = z . infer < typeof Command >
@@ -669,7 +671,7 @@ export namespace Config {
669671
670672 export const Agent = z
671673 . object ( {
672- model : z . string ( ) . optional ( ) ,
674+ model : ModelId . optional ( ) ,
673675 variant : z
674676 . string ( )
675677 . optional ( )
@@ -1040,11 +1042,8 @@ export namespace Config {
10401042 . array ( z . string ( ) )
10411043 . optional ( )
10421044 . describe ( "When set, ONLY these providers will be enabled. All other providers will be ignored" ) ,
1043- model : z . string ( ) . describe ( "Model to use in the format of provider/model, eg anthropic/claude-2" ) . optional ( ) ,
1044- small_model : z
1045- . string ( )
1046- . describe ( "Small model to use for tasks like title generation in the format of provider/model" )
1047- . optional ( ) ,
1045+ model : ModelId . describe ( "Model to use in the format of provider/model, eg anthropic/claude-2" ) . optional ( ) ,
1046+ small_model : ModelId . describe ( "Small model to use for tasks like title generation in the format of provider/model" ) . optional ( ) ,
10481047 default_agent : z
10491048 . string ( )
10501049 . optional ( )
0 commit comments