diff --git a/src/types.ts b/src/types.ts index 8ff6f65b..b22e8fb2 100644 --- a/src/types.ts +++ b/src/types.ts @@ -791,15 +791,25 @@ export const LoggingMessageNotificationSchema = NotificationSchema.extend({ }); /* Sampling */ +/** + * Hints to use for model selection. + */ +export const ModelHintSchema = z.object({ + /** + * A hint for a model name. + */ + name: z.string().optional(), +}).passthrough(); + /** * The server's preferences for model selection, requested of the client during sampling. */ export const ModelPreferencesSchema = z .object({ /** - * Optional string hints to use for model selection. + * Optional hints to use for model selection. */ - hints: z.optional(z.array(z.record(z.string()))), + hints: z.optional(z.array(ModelHintSchema)), /** * How much to prioritize cost when selecting a model. */