UNPKG

@ai-sdk/mistral

Version:

The **[Mistral provider](https://ai-sdk.dev/providers/ai-sdk-providers/mistral)** for the [AI SDK](https://ai-sdk.dev/docs) contains language model, embedding model, and speech model support for Mistral APIs.

30 lines (24 loc) 738 B
import { z } from 'zod/v4'; export type MistralEmbeddingModelId = | 'mistral-embed' | 'codestral-embed-2505' | (string & {}); export const mistralEmbeddingModelOptions = z.object({ /** * Additional metadata to attach to the embedding request. */ metadata: z.record(z.string(), z.any()).optional(), /** * The dimension of the output embeddings when supported by the model. */ outputDimension: z.number().int().positive().optional(), /** * The data type of the output embeddings when supported by the model. */ outputDtype: z .enum(['float', 'int8', 'uint8', 'binary', 'ubinary']) .optional(), }); export type MistralEmbeddingModelOptions = z.infer< typeof mistralEmbeddingModelOptions >;