Split out ModelHintSchema for better typing and docs
This commit is contained in:
parent
f7f0ccff0e
commit
f74a289211
1 changed files with 12 additions and 2 deletions
14
src/types.ts
14
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.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue