@tanstack/ai-mistral 0.7.2 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"model-meta.js","names":[],"sources":["../../src/model-meta.ts"],"sourcesContent":["import type { Modality, ModelReasoning } from '@tanstack/ai'\nimport type { ModelReasoningCapability } from '@tanstack/ai/adapter-internals'\nimport type { MistralTextProviderOptions } from './text/text-provider-options'\nimport type {\n CodestralEmbedProviderOptions,\n MistralEmbedProviderOptions,\n} from './embedding/embedding-provider-options'\n\n// Reasoning shapes: the levels a model has for `chat({ reasoning })`, and\n// the provider value to send for each. Each model points at one of them.\nconst EFFORT_NONE_HIGH = {\n levels: { off: 'none', high: 'high' },\n budget: false,\n} as const\nconst EFFORT_OFF_HIGH = {\n levels: { off: 'off', high: 'high' },\n budget: false,\n} as const\n\n/** Provider options for vision-capable Mistral models (pixtral-*). */\nexport type MistralVisionProviderOptions = MistralTextProviderOptions\n\n/** Provider options for reasoning-capable Mistral models (magistral-*). */\nexport type MistralReasoningProviderOptions = MistralTextProviderOptions\n\n/**\n * Internal metadata structure describing a Mistral model's capabilities\n * and approximate pricing (USD per million tokens).\n */\ninterface ModelMeta<TProviderOptions = unknown> {\n name: string\n context_window?: number\n max_completion_tokens?: number\n pricing: {\n input?: { normal: number; cached?: number }\n output?: { normal: number }\n }\n supports: {\n input: Array<'text' | 'image' | 'audio' | 'document'>\n output: Array<'text'>\n endpoints: Array<'chat' | 'embeddings'>\n\n features: Array<\n | 'streaming'\n | 'tools'\n | 'json_object'\n | 'json_schema'\n | 'reasoning'\n | 'vision'\n | 'code'\n >\n }\n providerOptions?: TProviderOptions\n /** The model's data for `chat({ reasoning })`. None: it does not reason. */\n reasoning?: ModelReasoning\n}\n\nconst MISTRAL_LARGE_LATEST = {\n name: 'mistral-large-latest',\n context_window: 131_072,\n max_completion_tokens: 8_192,\n pricing: {\n input: { normal: 0.5 },\n output: { normal: 1.5 },\n },\n supports: {\n input: ['text'],\n output: ['text'],\n endpoints: ['chat'],\n features: ['streaming', 'tools', 'json_object', 'json_schema'],\n },\n} as const satisfies ModelMeta<MistralTextProviderOptions>\n\nconst MISTRAL_MEDIUM_LATEST = {\n name: 'mistral-medium-latest',\n context_window: 131_072,\n max_completion_tokens: 8_192,\n pricing: {\n input: { normal: 0.4 },\n output: { normal: 2 },\n },\n supports: {\n input: ['text', 'image', 'document'],\n output: ['text'],\n endpoints: ['chat'],\n features: ['streaming', 'tools', 'json_object', 'json_schema', 'vision'],\n },\n reasoning: EFFORT_NONE_HIGH,\n} as const satisfies ModelMeta<MistralTextProviderOptions>\n\nconst MISTRAL_SMALL_LATEST = {\n name: 'mistral-small-latest',\n context_window: 131_072,\n max_completion_tokens: 8_192,\n pricing: {\n input: { normal: 0.1 },\n output: { normal: 0.3 },\n },\n supports: {\n input: ['text', 'image', 'document'],\n output: ['text'],\n endpoints: ['chat'],\n features: ['streaming', 'tools', 'json_object', 'json_schema', 'vision'],\n },\n reasoning: EFFORT_NONE_HIGH,\n} as const satisfies ModelMeta<MistralTextProviderOptions>\n\nconst MINISTRAL_8B_LATEST = {\n name: 'ministral-8b-latest',\n context_window: 131_072,\n max_completion_tokens: 8_192,\n pricing: {\n input: { normal: 0.1 },\n output: { normal: 0.1 },\n },\n supports: {\n input: ['text'],\n output: ['text'],\n endpoints: ['chat'],\n features: ['streaming', 'tools', 'json_object', 'json_schema'],\n },\n} as const satisfies ModelMeta<MistralTextProviderOptions>\n\nconst MINISTRAL_3B_LATEST = {\n name: 'ministral-3b-latest',\n context_window: 131_072,\n max_completion_tokens: 8_192,\n pricing: {\n input: { normal: 0.04 },\n output: { normal: 0.04 },\n },\n supports: {\n input: ['text'],\n output: ['text'],\n endpoints: ['chat'],\n features: ['streaming', 'tools', 'json_object', 'json_schema'],\n },\n} as const satisfies ModelMeta<MistralTextProviderOptions>\n\nconst CODESTRAL_LATEST = {\n name: 'codestral-latest',\n context_window: 256_000,\n max_completion_tokens: 8_192,\n pricing: {\n input: { normal: 0.3 },\n output: { normal: 0.9 },\n },\n supports: {\n input: ['text'],\n output: ['text'],\n endpoints: ['chat'],\n features: ['streaming', 'tools', 'json_object', 'json_schema', 'code'],\n },\n} as const satisfies ModelMeta<MistralTextProviderOptions>\n\nconst PIXTRAL_LARGE_LATEST = {\n name: 'pixtral-large-latest',\n context_window: 131_072,\n max_completion_tokens: 8_192,\n pricing: {\n input: { normal: 2 },\n output: { normal: 6 },\n },\n supports: {\n input: ['text', 'image', 'document'],\n output: ['text'],\n endpoints: ['chat'],\n features: ['streaming', 'tools', 'json_object', 'json_schema', 'vision'],\n },\n} as const satisfies ModelMeta<MistralTextProviderOptions>\n\nconst PIXTRAL_12B_2409 = {\n name: 'pixtral-12b-2409',\n context_window: 131_072,\n max_completion_tokens: 8_192,\n pricing: {\n input: { normal: 0.15 },\n output: { normal: 0.15 },\n },\n supports: {\n input: ['text', 'image', 'document'],\n output: ['text'],\n endpoints: ['chat'],\n features: ['streaming', 'tools', 'json_object', 'vision'],\n },\n} as const satisfies ModelMeta<MistralTextProviderOptions>\n\nconst MAGISTRAL_MEDIUM_LATEST = {\n name: 'magistral-medium-latest',\n context_window: 40_000,\n max_completion_tokens: 40_000,\n pricing: {\n input: { normal: 2 },\n output: { normal: 5 },\n },\n supports: {\n input: ['text'],\n output: ['text'],\n endpoints: ['chat'],\n features: ['streaming', 'tools', 'reasoning', 'json_object', 'json_schema'],\n },\n reasoning: EFFORT_OFF_HIGH,\n} as const satisfies ModelMeta<MistralTextProviderOptions>\n\nconst MAGISTRAL_SMALL_LATEST = {\n name: 'magistral-small-latest',\n context_window: 40_000,\n max_completion_tokens: 40_000,\n pricing: {\n input: { normal: 0.5 },\n output: { normal: 1.5 },\n },\n supports: {\n input: ['text'],\n output: ['text'],\n endpoints: ['chat'],\n features: ['streaming', 'tools', 'reasoning', 'json_object', 'json_schema'],\n },\n // Not in models.dev. The same as Magistral Medium: prompt_mode only.\n reasoning: EFFORT_OFF_HIGH,\n} as const satisfies ModelMeta<MistralTextProviderOptions>\n\nconst OPEN_MISTRAL_NEMO = {\n name: 'open-mistral-nemo',\n context_window: 131_072,\n max_completion_tokens: 8_192,\n pricing: {\n input: { normal: 0.15 },\n output: { normal: 0.15 },\n },\n supports: {\n input: ['text'],\n output: ['text'],\n endpoints: ['chat'],\n features: ['streaming', 'tools', 'json_object'],\n },\n} as const satisfies ModelMeta<MistralTextProviderOptions>\n\n// Vertex Model Garden IDs. These are not the Mistral API catalog.\n// Source: https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/partner-models/mistral\nconst MISTRAL_MEDIUM_3 = {\n name: 'mistral-medium-3',\n context_window: 131_072,\n max_completion_tokens: 8_192,\n pricing: {\n input: { normal: 0.4 },\n output: { normal: 2 },\n },\n supports: {\n input: ['text', 'image', 'document'],\n output: ['text'],\n endpoints: ['chat'],\n features: ['streaming', 'tools', 'json_object', 'json_schema', 'vision'],\n },\n} as const satisfies ModelMeta<MistralTextProviderOptions>\n\nconst MISTRAL_SMALL_2503 = {\n name: 'mistral-small-2503',\n context_window: 131_072,\n max_completion_tokens: 8_192,\n pricing: {\n input: { normal: 0.1 },\n output: { normal: 0.3 },\n },\n supports: {\n input: ['text', 'image', 'document'],\n output: ['text'],\n endpoints: ['chat'],\n features: ['streaming', 'tools', 'json_object', 'json_schema', 'vision'],\n },\n} as const satisfies ModelMeta<MistralTextProviderOptions>\n\nconst CODESTRAL_2 = {\n name: 'codestral-2',\n context_window: 131_072,\n max_completion_tokens: 8_192,\n pricing: {\n input: { normal: 0.3 },\n output: { normal: 0.9 },\n },\n supports: {\n input: ['text'],\n output: ['text'],\n endpoints: ['chat'],\n features: ['streaming', 'tools', 'json_object', 'json_schema', 'code'],\n },\n} as const satisfies ModelMeta<MistralTextProviderOptions>\n\n/**\n * All supported Mistral chat model identifiers.\n */\nexport const MISTRAL_CHAT_MODELS = [\n MISTRAL_LARGE_LATEST.name,\n MISTRAL_MEDIUM_LATEST.name,\n MISTRAL_SMALL_LATEST.name,\n MINISTRAL_8B_LATEST.name,\n MINISTRAL_3B_LATEST.name,\n CODESTRAL_LATEST.name,\n PIXTRAL_LARGE_LATEST.name,\n PIXTRAL_12B_2409.name,\n MAGISTRAL_MEDIUM_LATEST.name,\n MAGISTRAL_SMALL_LATEST.name,\n OPEN_MISTRAL_NEMO.name,\n] as const\n\n/**\n * Union type of all supported Mistral chat model names.\n */\nexport type MistralChatModels = (typeof MISTRAL_CHAT_MODELS)[number]\n\n/**\n * Mistral chat models on Vertex AI / Gemini Enterprise Agent Platform.\n * This list is the Google partner catalog, not the Mistral API catalog.\n * OCR (`mistral-ocr-2505`) is not a chat model.\n */\nexport const MISTRAL_VERTEX_CHAT_MODELS = [\n MISTRAL_MEDIUM_3.name,\n MISTRAL_SMALL_2503.name,\n CODESTRAL_2.name,\n] as const\n\nexport type MistralVertexChatModel = (typeof MISTRAL_VERTEX_CHAT_MODELS)[number]\nexport type MistralTextAdapterModel = MistralChatModels | MistralVertexChatModel\n\n/**\n * Type-only map from Mistral chat model name to its supported input modalities.\n */\nexport type MistralModelInputModalitiesByName = {\n [MISTRAL_LARGE_LATEST.name]: typeof MISTRAL_LARGE_LATEST.supports.input\n [MISTRAL_MEDIUM_LATEST.name]: typeof MISTRAL_MEDIUM_LATEST.supports.input\n [MISTRAL_SMALL_LATEST.name]: typeof MISTRAL_SMALL_LATEST.supports.input\n [MINISTRAL_8B_LATEST.name]: typeof MINISTRAL_8B_LATEST.supports.input\n [MINISTRAL_3B_LATEST.name]: typeof MINISTRAL_3B_LATEST.supports.input\n [CODESTRAL_LATEST.name]: typeof CODESTRAL_LATEST.supports.input\n [PIXTRAL_LARGE_LATEST.name]: typeof PIXTRAL_LARGE_LATEST.supports.input\n [PIXTRAL_12B_2409.name]: typeof PIXTRAL_12B_2409.supports.input\n [MAGISTRAL_MEDIUM_LATEST.name]: typeof MAGISTRAL_MEDIUM_LATEST.supports.input\n [MAGISTRAL_SMALL_LATEST.name]: typeof MAGISTRAL_SMALL_LATEST.supports.input\n [OPEN_MISTRAL_NEMO.name]: typeof OPEN_MISTRAL_NEMO.supports.input\n [MISTRAL_MEDIUM_3.name]: typeof MISTRAL_MEDIUM_3.supports.input\n [MISTRAL_SMALL_2503.name]: typeof MISTRAL_SMALL_2503.supports.input\n [CODESTRAL_2.name]: typeof CODESTRAL_2.supports.input\n}\n\n/**\n * Runtime map from chat model name to its supported input modalities, for the\n * text adapter's `inputModalities`. `satisfies` keeps it equal to\n * {@link MistralModelInputModalitiesByName}. An unknown name gives `undefined`.\n */\nexport const MISTRAL_MODEL_INPUT_MODALITIES: Readonly<\n Record<string, ReadonlyArray<Modality>>\n> = {\n [MISTRAL_LARGE_LATEST.name]: MISTRAL_LARGE_LATEST.supports.input,\n [MISTRAL_MEDIUM_LATEST.name]: MISTRAL_MEDIUM_LATEST.supports.input,\n [MISTRAL_SMALL_LATEST.name]: MISTRAL_SMALL_LATEST.supports.input,\n [MINISTRAL_8B_LATEST.name]: MINISTRAL_8B_LATEST.supports.input,\n [MINISTRAL_3B_LATEST.name]: MINISTRAL_3B_LATEST.supports.input,\n [CODESTRAL_LATEST.name]: CODESTRAL_LATEST.supports.input,\n [PIXTRAL_LARGE_LATEST.name]: PIXTRAL_LARGE_LATEST.supports.input,\n [PIXTRAL_12B_2409.name]: PIXTRAL_12B_2409.supports.input,\n [MAGISTRAL_MEDIUM_LATEST.name]: MAGISTRAL_MEDIUM_LATEST.supports.input,\n [MAGISTRAL_SMALL_LATEST.name]: MAGISTRAL_SMALL_LATEST.supports.input,\n [OPEN_MISTRAL_NEMO.name]: OPEN_MISTRAL_NEMO.supports.input,\n [MISTRAL_MEDIUM_3.name]: MISTRAL_MEDIUM_3.supports.input,\n [MISTRAL_SMALL_2503.name]: MISTRAL_SMALL_2503.supports.input,\n [CODESTRAL_2.name]: CODESTRAL_2.supports.input,\n} satisfies MistralModelInputModalitiesByName\n\n/**\n * Type-only map from Mistral chat model name to its provider options type.\n */\nexport type MistralChatModelProviderOptionsByName = {\n [MISTRAL_LARGE_LATEST.name]: MistralTextProviderOptions\n [MISTRAL_MEDIUM_LATEST.name]: MistralVisionProviderOptions\n [MISTRAL_SMALL_LATEST.name]: MistralVisionProviderOptions\n [MINISTRAL_8B_LATEST.name]: MistralTextProviderOptions\n [MINISTRAL_3B_LATEST.name]: MistralTextProviderOptions\n [CODESTRAL_LATEST.name]: MistralTextProviderOptions\n [PIXTRAL_LARGE_LATEST.name]: MistralVisionProviderOptions\n [PIXTRAL_12B_2409.name]: MistralVisionProviderOptions\n [MAGISTRAL_MEDIUM_LATEST.name]: MistralReasoningProviderOptions\n [MAGISTRAL_SMALL_LATEST.name]: MistralReasoningProviderOptions\n [OPEN_MISTRAL_NEMO.name]: MistralTextProviderOptions\n [MISTRAL_MEDIUM_3.name]: MistralVisionProviderOptions\n [MISTRAL_SMALL_2503.name]: MistralVisionProviderOptions\n [CODESTRAL_2.name]: MistralTextProviderOptions\n}\n\n/**\n * Embedding models (based on endpoints: \"embeddings\")\n */\nexport const MISTRAL_EMBEDDING_MODELS = [\n 'mistral-embed',\n 'codestral-embed',\n] as const\n\n/**\n * Union type of all supported Mistral embedding model names.\n */\nexport type MistralEmbeddingModel = (typeof MISTRAL_EMBEDDING_MODELS)[number]\n\n/**\n * Type-only map from embedding model name to its provider options type.\n *\n * `mistral-embed` accepts no provider options (fixed 1024-dim output);\n * `codestral-embed` additionally supports `outputDtype`.\n */\nexport type MistralEmbeddingModelProviderOptionsByName = {\n 'mistral-embed': MistralEmbedProviderOptions\n 'codestral-embed': CodestralEmbedProviderOptions\n}\n\n/**\n * Per-model input modalities for embedding models. Mistral embedding models\n * are text-only, so image inputs fail at compile time.\n */\nexport type MistralEmbeddingModelInputModalitiesByName = {\n 'mistral-embed': readonly ['text']\n 'codestral-embed': readonly ['text']\n}\n\n/**\n * Resolves the provider options type for a specific Mistral model.\n */\nexport type ResolveProviderOptions<TModel extends string> =\n TModel extends keyof MistralChatModelProviderOptionsByName\n ? MistralChatModelProviderOptionsByName[TModel]\n : MistralTextProviderOptions\n\n/**\n * Resolve input modalities for a specific model.\n */\nexport type ResolveInputModalities<TModel extends string> =\n TModel extends keyof MistralModelInputModalitiesByName\n ? MistralModelInputModalitiesByName[TModel]\n : readonly ['text']\n\n// Reasoning\n//\n// Each model's `reasoning` field holds its data for `chat({ reasoning })`: the\n// levels it has, with the provider value for each, and whether it takes a\n// thinking token budget. The data comes from models.dev. The generator that\n// writes it comes with the model catalog later. Until then, the sync scripts\n// keep these fields as they are.\n\nconst MISTRAL_REASONING = {\n [MISTRAL_MEDIUM_LATEST.name]: MISTRAL_MEDIUM_LATEST.reasoning,\n [MISTRAL_SMALL_LATEST.name]: MISTRAL_SMALL_LATEST.reasoning,\n [MAGISTRAL_MEDIUM_LATEST.name]: MAGISTRAL_MEDIUM_LATEST.reasoning,\n [MAGISTRAL_SMALL_LATEST.name]: MAGISTRAL_SMALL_LATEST.reasoning,\n}\n\n/**\n * Each chat model's reasoning levels, and whether it takes a token budget,\n * for `chat({ reasoning })`. Derived from the `reasoning` field. A model\n * that is not here does not reason.\n */\nexport type MistralModelReasoningByName = {\n [K in keyof typeof MISTRAL_REASONING]: ModelReasoningCapability<\n (typeof MISTRAL_REASONING)[K]\n >\n}\n\n/**\n * Runtime map from chat model name to its reasoning data, for the text adapter.\n * An unknown name gives `undefined`: the adapter sends no reasoning field.\n */\nexport const MISTRAL_MODEL_REASONING: Readonly<Record<string, ModelReasoning>> =\n MISTRAL_REASONING\n"],"mappings":";AAUA,IAAM,mBAAmB;CACvB,QAAQ;EAAE,KAAK;EAAQ,MAAM;CAAO;CACpC,QAAQ;AACV;AACA,IAAM,kBAAkB;CACtB,QAAQ;EAAE,KAAK;EAAO,MAAM;CAAO;CACnC,QAAQ;AACV;AAwCA,IAAM,uBAAuB;CAC3B,MAAM;CACN,gBAAgB;CAChB,uBAAuB;CACvB,SAAS;EACP,OAAO,EAAE,QAAQ,GAAI;EACrB,QAAQ,EAAE,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ources":["../../src/model-meta.ts"],"sourcesContent":["import type { Modality, ModelReasoning } from '@tanstack/ai'\nimport type { ModelReasoningCapability } from '@tanstack/ai/adapter-internals'\nimport type { MistralTextProviderOptions } from './text/text-provider-options'\nimport type {\n CodestralEmbedProviderOptions,\n MistralEmbedProviderOptions,\n} from './embedding/embedding-provider-options'\n\n// Reasoning shapes: the levels a model has for `chat({ reasoning })`, and\n// the provider value to send for each. Each model points at one of them.\nconst EFFORT_NONE_HIGH = {\n levels: { off: 'none', high: 'high' },\n budget: false,\n} as const\nconst EFFORT_OFF_HIGH = {\n levels: { off: 'off', high: 'high' },\n budget: false,\n} as const\n\n/** Provider options for vision-capable Mistral models. */\nexport type MistralVisionProviderOptions = MistralTextProviderOptions\n\n/** Provider options for reasoning-capable Mistral models (magistral-*). */\nexport type MistralReasoningProviderOptions = MistralTextProviderOptions\n\n/**\n * Internal metadata structure describing a Mistral model's capabilities\n * and approximate pricing (USD per million tokens).\n */\ninterface ModelMeta<TProviderOptions = unknown> {\n name: string\n context_window?: number\n max_completion_tokens?: number\n pricing: {\n input?: { normal: number; cached?: number }\n output?: { normal: number }\n }\n supports: {\n input: Array<'text' | 'image' | 'audio' | 'document'>\n output: Array<'text'>\n endpoints: Array<'chat' | 'embeddings'>\n\n features: Array<\n | 'streaming'\n | 'tools'\n | 'json_object'\n | 'json_schema'\n | 'reasoning'\n | 'vision'\n | 'code'\n >\n }\n providerOptions?: TProviderOptions\n /** The model's data for `chat({ reasoning })`. None: it does not reason. */\n reasoning?: ModelReasoning\n}\n\nconst MISTRAL_LARGE_LATEST = {\n name: 'mistral-large-latest',\n context_window: 131_072,\n max_completion_tokens: 8_192,\n pricing: {\n input: { normal: 0.5 },\n output: { normal: 1.5 },\n },\n supports: {\n input: ['text'],\n output: ['text'],\n endpoints: ['chat'],\n features: ['streaming', 'tools', 'json_object', 'json_schema'],\n },\n} as const satisfies ModelMeta<MistralTextProviderOptions>\n\nconst MISTRAL_MEDIUM_LATEST = {\n name: 'mistral-medium-latest',\n context_window: 131_072,\n max_completion_tokens: 8_192,\n pricing: {\n input: { normal: 0.4 },\n output: { normal: 2 },\n },\n supports: {\n input: ['text', 'image', 'document'],\n output: ['text'],\n endpoints: ['chat'],\n features: ['streaming', 'tools', 'json_object', 'json_schema', 'vision'],\n },\n reasoning: EFFORT_NONE_HIGH,\n} as const satisfies ModelMeta<MistralTextProviderOptions>\n\nconst MISTRAL_SMALL_LATEST = {\n name: 'mistral-small-latest',\n context_window: 131_072,\n max_completion_tokens: 8_192,\n pricing: {\n input: { normal: 0.1 },\n output: { normal: 0.3 },\n },\n supports: {\n input: ['text', 'image', 'document'],\n output: ['text'],\n endpoints: ['chat'],\n features: ['streaming', 'tools', 'json_object', 'json_schema', 'vision'],\n },\n reasoning: EFFORT_NONE_HIGH,\n} as const satisfies ModelMeta<MistralTextProviderOptions>\n\nconst MINISTRAL_8B_LATEST = {\n name: 'ministral-8b-latest',\n context_window: 131_072,\n max_completion_tokens: 8_192,\n pricing: {\n input: { normal: 0.1 },\n output: { normal: 0.1 },\n },\n supports: {\n input: ['text'],\n output: ['text'],\n endpoints: ['chat'],\n features: ['streaming', 'tools', 'json_object', 'json_schema'],\n },\n} as const satisfies ModelMeta<MistralTextProviderOptions>\n\nconst MINISTRAL_3B_LATEST = {\n name: 'ministral-3b-latest',\n context_window: 131_072,\n max_completion_tokens: 8_192,\n pricing: {\n input: { normal: 0.04 },\n output: { normal: 0.04 },\n },\n supports: {\n input: ['text'],\n output: ['text'],\n endpoints: ['chat'],\n features: ['streaming', 'tools', 'json_object', 'json_schema'],\n },\n} as const satisfies ModelMeta<MistralTextProviderOptions>\n\nconst CODESTRAL_LATEST = {\n name: 'codestral-latest',\n context_window: 256_000,\n max_completion_tokens: 8_192,\n pricing: {\n input: { normal: 0.3 },\n output: { normal: 0.9 },\n },\n supports: {\n input: ['text'],\n output: ['text'],\n endpoints: ['chat'],\n features: ['streaming', 'tools', 'json_object', 'json_schema', 'code'],\n },\n} as const satisfies ModelMeta<MistralTextProviderOptions>\n\nconst MAGISTRAL_MEDIUM_LATEST = {\n name: 'magistral-medium-latest',\n context_window: 40_000,\n max_completion_tokens: 40_000,\n pricing: {\n input: { normal: 2 },\n output: { normal: 5 },\n },\n supports: {\n input: ['text'],\n output: ['text'],\n endpoints: ['chat'],\n features: ['streaming', 'tools', 'reasoning', 'json_object', 'json_schema'],\n },\n reasoning: EFFORT_OFF_HIGH,\n} as const satisfies ModelMeta<MistralTextProviderOptions>\n\nconst MAGISTRAL_SMALL_LATEST = {\n name: 'magistral-small-latest',\n context_window: 40_000,\n max_completion_tokens: 40_000,\n pricing: {\n input: { normal: 0.5 },\n output: { normal: 1.5 },\n },\n supports: {\n input: ['text'],\n output: ['text'],\n endpoints: ['chat'],\n features: ['streaming', 'tools', 'reasoning', 'json_object', 'json_schema'],\n },\n // Not in models.dev. The same as Magistral Medium: prompt_mode only.\n reasoning: EFFORT_OFF_HIGH,\n} as const satisfies ModelMeta<MistralTextProviderOptions>\n\n// Vertex Model Garden IDs. These are not the Mistral API catalog.\n// Source: https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/partner-models/mistral\nconst MISTRAL_MEDIUM_3 = {\n name: 'mistral-medium-3',\n context_window: 131_072,\n max_completion_tokens: 8_192,\n pricing: {\n input: { normal: 0.4 },\n output: { normal: 2 },\n },\n supports: {\n input: ['text', 'image', 'document'],\n output: ['text'],\n endpoints: ['chat'],\n features: ['streaming', 'tools', 'json_object', 'json_schema', 'vision'],\n },\n} as const satisfies ModelMeta<MistralTextProviderOptions>\n\nconst MISTRAL_SMALL_2503 = {\n name: 'mistral-small-2503',\n context_window: 131_072,\n max_completion_tokens: 8_192,\n pricing: {\n input: { normal: 0.1 },\n output: { normal: 0.3 },\n },\n supports: {\n input: ['text', 'image', 'document'],\n output: ['text'],\n endpoints: ['chat'],\n features: ['streaming', 'tools', 'json_object', 'json_schema', 'vision'],\n },\n} as const satisfies ModelMeta<MistralTextProviderOptions>\n\nconst CODESTRAL_2 = {\n name: 'codestral-2',\n context_window: 131_072,\n max_completion_tokens: 8_192,\n pricing: {\n input: { normal: 0.3 },\n output: { normal: 0.9 },\n },\n supports: {\n input: ['text'],\n output: ['text'],\n endpoints: ['chat'],\n features: ['streaming', 'tools', 'json_object', 'json_schema', 'code'],\n },\n} as const satisfies ModelMeta<MistralTextProviderOptions>\n\n/**\n * All supported Mistral chat model identifiers.\n */\nexport const MISTRAL_CHAT_MODELS = [\n MISTRAL_LARGE_LATEST.name,\n MISTRAL_MEDIUM_LATEST.name,\n MISTRAL_SMALL_LATEST.name,\n MINISTRAL_8B_LATEST.name,\n MINISTRAL_3B_LATEST.name,\n CODESTRAL_LATEST.name,\n MAGISTRAL_MEDIUM_LATEST.name,\n MAGISTRAL_SMALL_LATEST.name,\n] as const\n\n/**\n * Union type of all supported Mistral chat model names.\n */\nexport type MistralChatModels = (typeof MISTRAL_CHAT_MODELS)[number]\n\n/**\n * Mistral chat models on Vertex AI / Gemini Enterprise Agent Platform.\n * This list is the Google partner catalog, not the Mistral API catalog.\n * OCR (`mistral-ocr-2505`) is not a chat model.\n */\nexport const MISTRAL_VERTEX_CHAT_MODELS = [\n MISTRAL_MEDIUM_3.name,\n MISTRAL_SMALL_2503.name,\n CODESTRAL_2.name,\n] as const\n\nexport type MistralVertexChatModel = (typeof MISTRAL_VERTEX_CHAT_MODELS)[number]\nexport type MistralTextAdapterModel = MistralChatModels | MistralVertexChatModel\n\n/**\n * Type-only map from Mistral chat model name to its supported input modalities.\n */\nexport type MistralModelInputModalitiesByName = {\n [MISTRAL_LARGE_LATEST.name]: typeof MISTRAL_LARGE_LATEST.supports.input\n [MISTRAL_MEDIUM_LATEST.name]: typeof MISTRAL_MEDIUM_LATEST.supports.input\n [MISTRAL_SMALL_LATEST.name]: typeof MISTRAL_SMALL_LATEST.supports.input\n [MINISTRAL_8B_LATEST.name]: typeof MINISTRAL_8B_LATEST.supports.input\n [MINISTRAL_3B_LATEST.name]: typeof MINISTRAL_3B_LATEST.supports.input\n [CODESTRAL_LATEST.name]: typeof CODESTRAL_LATEST.supports.input\n [MAGISTRAL_MEDIUM_LATEST.name]: typeof MAGISTRAL_MEDIUM_LATEST.supports.input\n [MAGISTRAL_SMALL_LATEST.name]: typeof MAGISTRAL_SMALL_LATEST.supports.input\n [MISTRAL_MEDIUM_3.name]: typeof MISTRAL_MEDIUM_3.supports.input\n [MISTRAL_SMALL_2503.name]: typeof MISTRAL_SMALL_2503.supports.input\n [CODESTRAL_2.name]: typeof CODESTRAL_2.supports.input\n}\n\n/**\n * Runtime map from chat model name to its supported input modalities, for the\n * text adapter's `inputModalities`. `satisfies` keeps it equal to\n * {@link MistralModelInputModalitiesByName}. An unknown name gives `undefined`.\n */\nexport const MISTRAL_MODEL_INPUT_MODALITIES: Readonly<\n Record<string, ReadonlyArray<Modality>>\n> = {\n [MISTRAL_LARGE_LATEST.name]: MISTRAL_LARGE_LATEST.supports.input,\n [MISTRAL_MEDIUM_LATEST.name]: MISTRAL_MEDIUM_LATEST.supports.input,\n [MISTRAL_SMALL_LATEST.name]: MISTRAL_SMALL_LATEST.supports.input,\n [MINISTRAL_8B_LATEST.name]: MINISTRAL_8B_LATEST.supports.input,\n [MINISTRAL_3B_LATEST.name]: MINISTRAL_3B_LATEST.supports.input,\n [CODESTRAL_LATEST.name]: CODESTRAL_LATEST.supports.input,\n [MAGISTRAL_MEDIUM_LATEST.name]: MAGISTRAL_MEDIUM_LATEST.supports.input,\n [MAGISTRAL_SMALL_LATEST.name]: MAGISTRAL_SMALL_LATEST.supports.input,\n [MISTRAL_MEDIUM_3.name]: MISTRAL_MEDIUM_3.supports.input,\n [MISTRAL_SMALL_2503.name]: MISTRAL_SMALL_2503.supports.input,\n [CODESTRAL_2.name]: CODESTRAL_2.supports.input,\n} satisfies MistralModelInputModalitiesByName\n\n/**\n * Type-only map from Mistral chat model name to its provider options type.\n */\nexport type MistralChatModelProviderOptionsByName = {\n [MISTRAL_LARGE_LATEST.name]: MistralTextProviderOptions\n [MISTRAL_MEDIUM_LATEST.name]: MistralVisionProviderOptions\n [MISTRAL_SMALL_LATEST.name]: MistralVisionProviderOptions\n [MINISTRAL_8B_LATEST.name]: MistralTextProviderOptions\n [MINISTRAL_3B_LATEST.name]: MistralTextProviderOptions\n [CODESTRAL_LATEST.name]: MistralTextProviderOptions\n [MAGISTRAL_MEDIUM_LATEST.name]: MistralReasoningProviderOptions\n [MAGISTRAL_SMALL_LATEST.name]: MistralReasoningProviderOptions\n [MISTRAL_MEDIUM_3.name]: MistralVisionProviderOptions\n [MISTRAL_SMALL_2503.name]: MistralVisionProviderOptions\n [CODESTRAL_2.name]: MistralTextProviderOptions\n}\n\n/**\n * Embedding models (based on endpoints: \"embeddings\")\n */\nexport const MISTRAL_EMBEDDING_MODELS = [\n 'mistral-embed',\n 'codestral-embed',\n] as const\n\n/**\n * Union type of all supported Mistral embedding model names.\n */\nexport type MistralEmbeddingModel = (typeof MISTRAL_EMBEDDING_MODELS)[number]\n\n/**\n * Type-only map from embedding model name to its provider options type.\n *\n * `mistral-embed` accepts no provider options (fixed 1024-dim output);\n * `codestral-embed` additionally supports `outputDtype`.\n */\nexport type MistralEmbeddingModelProviderOptionsByName = {\n 'mistral-embed': MistralEmbedProviderOptions\n 'codestral-embed': CodestralEmbedProviderOptions\n}\n\n/**\n * Per-model input modalities for embedding models. Mistral embedding models\n * are text-only, so image inputs fail at compile time.\n */\nexport type MistralEmbeddingModelInputModalitiesByName = {\n 'mistral-embed': readonly ['text']\n 'codestral-embed': readonly ['text']\n}\n\n/**\n * Resolves the provider options type for a specific Mistral model.\n */\nexport type ResolveProviderOptions<TModel extends string> =\n TModel extends keyof MistralChatModelProviderOptionsByName\n ? MistralChatModelProviderOptionsByName[TModel]\n : MistralTextProviderOptions\n\n/**\n * Resolve input modalities for a specific model.\n */\nexport type ResolveInputModalities<TModel extends string> =\n TModel extends keyof MistralModelInputModalitiesByName\n ? MistralModelInputModalitiesByName[TModel]\n : readonly ['text']\n\n// Reasoning\n//\n// Each model's `reasoning` field holds its data for `chat({ reasoning })`: the\n// levels it has, with the provider value for each, and whether it takes a\n// thinking token budget. The data comes from models.dev. The generator that\n// writes it comes with the model catalog later. Until then, the sync scripts\n// keep these fields as they are.\n\nconst MISTRAL_REASONING = {\n [MISTRAL_MEDIUM_LATEST.name]: MISTRAL_MEDIUM_LATEST.reasoning,\n [MISTRAL_SMALL_LATEST.name]: MISTRAL_SMALL_LATEST.reasoning,\n [MAGISTRAL_MEDIUM_LATEST.name]: MAGISTRAL_MEDIUM_LATEST.reasoning,\n [MAGISTRAL_SMALL_LATEST.name]: MAGISTRAL_SMALL_LATEST.reasoning,\n}\n\n/**\n * Each chat model's reasoning levels, and whether it takes a token budget,\n * for `chat({ reasoning })`. Derived from the `reasoning` field. A model\n * that is not here does not reason.\n */\nexport type MistralModelReasoningByName = {\n [K in keyof typeof MISTRAL_REASONING]: ModelReasoningCapability<\n (typeof MISTRAL_REASONING)[K]\n >\n}\n\n/**\n * Runtime map from chat model name to its reasoning data, for the text adapter.\n * An unknown name gives `undefined`: the adapter sends no reasoning field.\n */\nexport const MISTRAL_MODEL_REASONING: Readonly<Record<string, ModelReasoning>> =\n MISTRAL_REASONING\n"],"mappings":";AAUA,IAAM,mBAAmB;CACvB,QAAQ;EAAE,KAAK;EAAQ,MAAM;CAAO;CACpC,QAAQ;AACV;AACA,IAAM,kBAAkB;CACtB,QAAQ;EAAE,KAAK;EAAO,MAAM;CAAO;CACnC,QAAQ;AACV;AAwCA,IAAM,uBAAuB;CAC3B,MAAM;CACN,gBAAgB;CAChB,uBAAuB;CACvB,SAAS;EACP,OAAO,EAAE,QAAQ,GAAI;EACrB,QAAQ,EAAE,QAAQ,IAAI;CACxB;CACA,UAAU;EACR,OAAO,CAAC,MAAM;EACd,QAAQ,CAAC,MAAM;EACf,WAAW,CAAC,MAAM;EAClB,UAAU;GAAC;GAAa;GAAS;GAAe;EAAa;CAC/D;AACF;AAEA,IAAM,wBAAwB;CAC5B,MAAM;CACN,gB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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/ai-mistral",
3
- "version": "0.7.2",
3
+ "version": "1.1.0",
4
4
  "type": "module",
5
5
  "description": "Mistral adapter for TanStack AI",
6
6
  "author": "",
@@ -48,11 +48,11 @@
48
48
  "@vitest/coverage-v8": "4.1.10",
49
49
  "google-auth-library": "^10.5.0",
50
50
  "vite": "^8.2.1",
51
- "@tanstack/ai": "0.71.0"
51
+ "@tanstack/ai": "1.1.0"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "google-auth-library": "^10.5.0",
55
- "@tanstack/ai": "^0.71.0"
55
+ "@tanstack/ai": "^1.1.0"
56
56
  },
57
57
  "peerDependenciesMeta": {
58
58
  "google-auth-library": {
@@ -61,7 +61,7 @@
61
61
  },
62
62
  "dependencies": {
63
63
  "@mistralai/mistralai": "2.2.0",
64
- "@tanstack/ai-utils": "0.5.0"
64
+ "@tanstack/ai-utils": "^1.0.1"
65
65
  },
66
66
  "scripts": {
67
67
  "build": "vite build",
@@ -85,7 +85,11 @@ export class MistralEmbeddingAdapter<
85
85
  { provider: this.name, model },
86
86
  )
87
87
 
88
- const response = await this.client.embeddings.create(request)
88
+ const response = options.abortSignal
89
+ ? await this.client.embeddings.create(request, {
90
+ fetchOptions: { signal: options.abortSignal },
91
+ })
92
+ : await this.client.embeddings.create(request)
89
93
 
90
94
  const usage: TokenUsage = {
91
95
  promptTokens: response.usage.promptTokens ?? 0,
@@ -29,6 +29,7 @@ import type {
29
29
  ReasoningRequest,
30
30
  ResolvedPromptCache,
31
31
  TextOptions,
32
+ TokenUsage,
32
33
  ToolChoice,
33
34
  } from '@tanstack/ai'
34
35
  import type {
@@ -336,9 +337,16 @@ export class MistralTextAdapter<
336
337
  const requestParams = this.mapTextOptionsToMistral(options)
337
338
  const timestamp = Date.now()
338
339
 
339
- const aguiState = {
340
+ const aguiState: {
341
+ runId: string
342
+ threadId: string
343
+ messageId: string
344
+ timestamp: number
345
+ hasEmittedRunStarted: boolean
346
+ usage?: TokenUsage
347
+ } = {
340
348
  runId: options.runId ?? generateId(this.name),
341
- threadId: options.threadId ?? generateId(this.name),
349
+ threadId: options.threadId,
342
350
  messageId: generateId(this.name),
343
351
  timestamp,
344
352
  hasEmittedRunStarted: false,
@@ -356,6 +364,7 @@ export class MistralTextAdapter<
356
364
  body,
357
365
  this.rawConfig,
358
366
  options.wrapFetch,
367
+ options.request?.signal ?? undefined,
359
368
  )
360
369
  for await (const chunk of this.processMistralStreamChunks(
361
370
  stream,
@@ -422,6 +431,7 @@ export class MistralTextAdapter<
422
431
  message: err.message || 'Unknown error',
423
432
  code: err.code,
424
433
  },
434
+ ...(aguiState.usage && { usage: aguiState.usage }),
425
435
  })
426
436
 
427
437
  throw err
@@ -456,23 +466,46 @@ export class MistralTextAdapter<
456
466
  : chatOptions.wrapFetch
457
467
  ? createMistralClient(this.rawConfig, next)
458
468
  : this.client
459
- const response = await client.chat.complete({
469
+ // The SDK drops its default 30 s timeout when the request has a signal
470
+ // (lib/sdks.js), so keep that timeout next to the caller signal.
471
+ const signal = chatOptions.request?.signal
472
+ const timeoutMs = this.rawConfig.timeoutMs || 30_000
473
+ const params = {
460
474
  ...nonStreamParams,
461
475
  responseFormat: {
462
- type: 'json_schema',
476
+ type: 'json_schema' as const,
463
477
  jsonSchema: {
464
478
  name: 'structured_output',
465
479
  schemaDefinition: jsonSchema,
466
480
  strict,
467
481
  },
468
482
  },
469
- })
483
+ }
484
+ const response = signal
485
+ ? await client.chat.complete(params, {
486
+ signal:
487
+ timeoutMs > 0
488
+ ? AbortSignal.any([signal, AbortSignal.timeout(timeoutMs)])
489
+ : signal,
490
+ })
491
+ : await client.chat.complete(params)
492
+
493
+ const usage = response.usage && {
494
+ promptTokens: response.usage.promptTokens ?? 0,
495
+ completionTokens: response.usage.completionTokens ?? 0,
496
+ totalTokens: response.usage.totalTokens ?? 0,
497
+ ...mistralCachedTokens(response.usage),
498
+ }
470
499
 
471
500
  // A response cut off at the output cap is a truncated JSON document;
472
- // report it before the parse error (issue #1426).
501
+ // report it before the parse error (issue #1426). The errors carry the
502
+ // usage, because the provider already billed the tokens.
473
503
  if (response.choices[0]?.finishReason === 'length') {
474
- throw new Error(
475
- 'mistral.structuredOutput: the response was cut off because the maximum token limit was reached (finish_reason=length); raise modelOptions.max_tokens',
504
+ throw Object.assign(
505
+ new Error(
506
+ 'mistral.structuredOutput: the response was cut off because the maximum token limit was reached (finish_reason=length); raise modelOptions.max_tokens',
507
+ ),
508
+ usage && { usage },
476
509
  )
477
510
  }
478
511
 
@@ -483,25 +516,20 @@ export class MistralTextAdapter<
483
516
  try {
484
517
  parsed = JSON.parse(textContent)
485
518
  } catch {
486
- throw new Error(
487
- `Failed to parse structured output as JSON. Content: ${textContent.slice(0, 200)}${textContent.length > 200 ? '...' : ''}`,
519
+ throw Object.assign(
520
+ new Error(
521
+ `Failed to parse structured output as JSON. Content: ${textContent.slice(0, 200)}${textContent.length > 200 ? '...' : ''}`,
522
+ ),
523
+ usage && { usage },
488
524
  )
489
525
  }
490
526
 
491
- const usage = response.usage
492
527
  return {
493
528
  data: undoNullWidening(parsed, nullWideningMap),
494
529
  ...(response.id && { responseId: response.id }),
495
530
  ...(response.model && { model: response.model }),
496
531
  rawText: textContent,
497
- ...(usage && {
498
- usage: {
499
- promptTokens: usage.promptTokens ?? 0,
500
- completionTokens: usage.completionTokens ?? 0,
501
- totalTokens: usage.totalTokens ?? 0,
502
- ...mistralCachedTokens(usage),
503
- },
504
- }),
532
+ ...(usage && { usage }),
505
533
  }
506
534
  }
507
535
 
@@ -517,9 +545,15 @@ export class MistralTextAdapter<
517
545
  messageId: string
518
546
  timestamp: number
519
547
  hasEmittedRunStarted: boolean
548
+ usage?: TokenUsage
520
549
  },
521
550
  ): AsyncIterable<AdapterYieldChunk> {
522
551
  let accumulatedContent = ''
552
+ // RUN_FINISHED waits for the end of the stream, so usage from a
553
+ // trailing usage-only chunk (`choices: []`) is included.
554
+ let finished:
555
+ | { model: string; finishReason: 'tool_calls' | 'length' | 'stop' }
556
+ | undefined
523
557
  const timestamp = aguiState.timestamp
524
558
  let hasEmittedTextMessageStart = false
525
559
  let hasEmittedTextMessageEnd = false
@@ -551,6 +585,14 @@ export class MistralTextAdapter<
551
585
  for await (const chunk of stream) {
552
586
  lastChunkModel = chunk.model || lastChunkModel
553
587
  if (chunk.id) responseId = chunk.id
588
+ if (chunk.usage) {
589
+ aguiState.usage = {
590
+ promptTokens: chunk.usage.prompt_tokens || 0,
591
+ completionTokens: chunk.usage.completion_tokens || 0,
592
+ totalTokens: chunk.usage.total_tokens || 0,
593
+ ...mistralCachedTokens(chunk.usage),
594
+ }
595
+ }
554
596
  const choice = chunk.choices?.[0]
555
597
  if (!choice) continue
556
598
 
@@ -656,7 +698,24 @@ export class MistralTextAdapter<
656
698
 
657
699
  if (deltaToolCalls) {
658
700
  for (const [i, toolCallDelta] of deltaToolCalls.entries()) {
659
- const index = toolCallDelta.index ?? i
701
+ let index = toolCallDelta.index ?? i
702
+ // Mistral can send each parallel call whole with the same `index`
703
+ // (the SDK fills a missing one with 0), so an id that differs from
704
+ // the one already in the slot starts a new call. A repeated id goes
705
+ // back to its own slot.
706
+ if (toolCallDelta.id) {
707
+ const occupant = toolCallsInProgress.get(index)
708
+ if (occupant?.id && occupant.id !== toolCallDelta.id) {
709
+ const sameId = [...toolCallsInProgress].find(
710
+ ([, call]) => call.id === toolCallDelta.id,
711
+ )
712
+ if (sameId) {
713
+ index = sameId[0]
714
+ } else {
715
+ while (toolCallsInProgress.has(index)) index += 1
716
+ }
717
+ }
718
+ }
660
719
 
661
720
  let toolCall = toolCallsInProgress.get(index)
662
721
  if (!toolCall) {
@@ -695,7 +754,6 @@ export class MistralTextAdapter<
695
754
  type: 'TOOL_CALL_START',
696
755
  toolCallId: toolCall.id,
697
756
  toolCallName: toolCall.name,
698
- toolName: toolCall.name,
699
757
  model: chunkModel,
700
758
  timestamp,
701
759
  index,
@@ -747,7 +805,6 @@ export class MistralTextAdapter<
747
805
  type: 'TOOL_CALL_END',
748
806
  toolCallId: toolCall.id,
749
807
  toolCallName: toolCall.name,
750
- toolName: toolCall.name,
751
808
  model: chunkModel,
752
809
  timestamp,
753
810
  args: toolCall.arguments,
@@ -792,28 +849,24 @@ export class MistralTextAdapter<
792
849
  })
793
850
  }
794
851
 
795
- const usage = chunk.usage
796
852
  hasEmittedRunFinished = true
797
- yield asChunk({
798
- type: 'RUN_FINISHED',
799
- ...(responseId && { responseId }),
800
- runId: aguiState.runId,
801
- threadId: aguiState.threadId,
802
- model: chunkModel,
803
- timestamp,
804
- usage: usage
805
- ? {
806
- promptTokens: usage.prompt_tokens || 0,
807
- completionTokens: usage.completion_tokens || 0,
808
- totalTokens: usage.total_tokens || 0,
809
- ...mistralCachedTokens(usage),
810
- }
811
- : undefined,
812
- finishReason: computedFinishReason,
813
- })
853
+ finished = { model: chunkModel, finishReason: computedFinishReason }
814
854
  }
815
855
  }
816
856
 
857
+ if (finished) {
858
+ yield asChunk({
859
+ type: 'RUN_FINISHED',
860
+ ...(responseId && { responseId }),
861
+ runId: aguiState.runId,
862
+ threadId: aguiState.threadId,
863
+ model: finished.model,
864
+ timestamp,
865
+ ...(aguiState.usage && { usage: aguiState.usage }),
866
+ finishReason: finished.finishReason,
867
+ })
868
+ }
869
+
817
870
  // Stream ended cleanly without finish_reason — flush any open
818
871
  // lifecycle events so consumers don't see orphaned starts. This
819
872
  // happens for abrupt `[DONE]` or upstream cuts.
@@ -844,7 +897,6 @@ export class MistralTextAdapter<
844
897
  type: 'TOOL_CALL_END',
845
898
  toolCallId: toolCall.id,
846
899
  toolCallName: toolCall.name,
847
- toolName: toolCall.name,
848
900
  model: lastChunkModel,
849
901
  timestamp,
850
902
  args: toolCall.arguments,
@@ -869,7 +921,7 @@ export class MistralTextAdapter<
869
921
  threadId: aguiState.threadId,
870
922
  model: lastChunkModel,
871
923
  timestamp,
872
- usage: undefined,
924
+ ...(aguiState.usage && { usage: aguiState.usage }),
873
925
  finishReason: hasEmittedToolCall ? 'tool_calls' : 'stop',
874
926
  })
875
927
  }
@@ -922,7 +974,6 @@ export class MistralTextAdapter<
922
974
  type: 'TOOL_CALL_END',
923
975
  toolCallId: toolCall.id,
924
976
  toolCallName: toolCall.name,
925
- toolName: toolCall.name,
926
977
  model: lastChunkModel,
927
978
  timestamp,
928
979
  args: toolCall.arguments,
@@ -943,6 +994,7 @@ export class MistralTextAdapter<
943
994
  body: Record<string, unknown>,
944
995
  config: MistralClientConfig,
945
996
  wrapFetch: FetchWrapper | undefined,
997
+ signal: AbortSignal | undefined,
946
998
  ): AsyncGenerator<MistralRawChunk> {
947
999
  const serverURL = (
948
1000
  config.baseURL ??
@@ -970,6 +1022,7 @@ export class MistralTextAdapter<
970
1022
  method: 'POST',
971
1023
  headers,
972
1024
  body: JSON.stringify(body),
1025
+ signal,
973
1026
  })
974
1027
 
975
1028
  if (!response.ok) {
@@ -10,7 +10,7 @@ describe('Mistral text adapter inputModalities', () => {
10
10
  new MistralTextAdapter(config, 'mistral-large-latest').inputModalities,
11
11
  ).toEqual(['text'])
12
12
  expect(
13
- new MistralTextAdapter(config, 'pixtral-large-latest').inputModalities,
13
+ new MistralTextAdapter(config, 'mistral-medium-latest').inputModalities,
14
14
  ).toEqual(['text', 'image', 'document'])
15
15
  })
16
16
 
package/src/model-meta.ts CHANGED
@@ -17,7 +17,7 @@ const EFFORT_OFF_HIGH = {
17
17
  budget: false,
18
18
  } as const
19
19
 
20
- /** Provider options for vision-capable Mistral models (pixtral-*). */
20
+ /** Provider options for vision-capable Mistral models. */
21
21
  export type MistralVisionProviderOptions = MistralTextProviderOptions
22
22
 
23
23
  /** Provider options for reasoning-capable Mistral models (magistral-*). */
@@ -153,38 +153,6 @@ const CODESTRAL_LATEST = {
153
153
  },
154
154
  } as const satisfies ModelMeta<MistralTextProviderOptions>
155
155
 
156
- const PIXTRAL_LARGE_LATEST = {
157
- name: 'pixtral-large-latest',
158
- context_window: 131_072,
159
- max_completion_tokens: 8_192,
160
- pricing: {
161
- input: { normal: 2 },
162
- output: { normal: 6 },
163
- },
164
- supports: {
165
- input: ['text', 'image', 'document'],
166
- output: ['text'],
167
- endpoints: ['chat'],
168
- features: ['streaming', 'tools', 'json_object', 'json_schema', 'vision'],
169
- },
170
- } as const satisfies ModelMeta<MistralTextProviderOptions>
171
-
172
- const PIXTRAL_12B_2409 = {
173
- name: 'pixtral-12b-2409',
174
- context_window: 131_072,
175
- max_completion_tokens: 8_192,
176
- pricing: {
177
- input: { normal: 0.15 },
178
- output: { normal: 0.15 },
179
- },
180
- supports: {
181
- input: ['text', 'image', 'document'],
182
- output: ['text'],
183
- endpoints: ['chat'],
184
- features: ['streaming', 'tools', 'json_object', 'vision'],
185
- },
186
- } as const satisfies ModelMeta<MistralTextProviderOptions>
187
-
188
156
  const MAGISTRAL_MEDIUM_LATEST = {
189
157
  name: 'magistral-medium-latest',
190
158
  context_window: 40_000,
@@ -220,22 +188,6 @@ const MAGISTRAL_SMALL_LATEST = {
220
188
  reasoning: EFFORT_OFF_HIGH,
221
189
  } as const satisfies ModelMeta<MistralTextProviderOptions>
222
190
 
223
- const OPEN_MISTRAL_NEMO = {
224
- name: 'open-mistral-nemo',
225
- context_window: 131_072,
226
- max_completion_tokens: 8_192,
227
- pricing: {
228
- input: { normal: 0.15 },
229
- output: { normal: 0.15 },
230
- },
231
- supports: {
232
- input: ['text'],
233
- output: ['text'],
234
- endpoints: ['chat'],
235
- features: ['streaming', 'tools', 'json_object'],
236
- },
237
- } as const satisfies ModelMeta<MistralTextProviderOptions>
238
-
239
191
  // Vertex Model Garden IDs. These are not the Mistral API catalog.
240
192
  // Source: https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/partner-models/mistral
241
193
  const MISTRAL_MEDIUM_3 = {
@@ -296,11 +248,8 @@ export const MISTRAL_CHAT_MODELS = [
296
248
  MINISTRAL_8B_LATEST.name,
297
249
  MINISTRAL_3B_LATEST.name,
298
250
  CODESTRAL_LATEST.name,
299
- PIXTRAL_LARGE_LATEST.name,
300
- PIXTRAL_12B_2409.name,
301
251
  MAGISTRAL_MEDIUM_LATEST.name,
302
252
  MAGISTRAL_SMALL_LATEST.name,
303
- OPEN_MISTRAL_NEMO.name,
304
253
  ] as const
305
254
 
306
255
  /**
@@ -332,11 +281,8 @@ export type MistralModelInputModalitiesByName = {
332
281
  [MINISTRAL_8B_LATEST.name]: typeof MINISTRAL_8B_LATEST.supports.input
333
282
  [MINISTRAL_3B_LATEST.name]: typeof MINISTRAL_3B_LATEST.supports.input
334
283
  [CODESTRAL_LATEST.name]: typeof CODESTRAL_LATEST.supports.input
335
- [PIXTRAL_LARGE_LATEST.name]: typeof PIXTRAL_LARGE_LATEST.supports.input
336
- [PIXTRAL_12B_2409.name]: typeof PIXTRAL_12B_2409.supports.input
337
284
  [MAGISTRAL_MEDIUM_LATEST.name]: typeof MAGISTRAL_MEDIUM_LATEST.supports.input
338
285
  [MAGISTRAL_SMALL_LATEST.name]: typeof MAGISTRAL_SMALL_LATEST.supports.input
339
- [OPEN_MISTRAL_NEMO.name]: typeof OPEN_MISTRAL_NEMO.supports.input
340
286
  [MISTRAL_MEDIUM_3.name]: typeof MISTRAL_MEDIUM_3.supports.input
341
287
  [MISTRAL_SMALL_2503.name]: typeof MISTRAL_SMALL_2503.supports.input
342
288
  [CODESTRAL_2.name]: typeof CODESTRAL_2.supports.input
@@ -356,11 +302,8 @@ export const MISTRAL_MODEL_INPUT_MODALITIES: Readonly<
356
302
  [MINISTRAL_8B_LATEST.name]: MINISTRAL_8B_LATEST.supports.input,
357
303
  [MINISTRAL_3B_LATEST.name]: MINISTRAL_3B_LATEST.supports.input,
358
304
  [CODESTRAL_LATEST.name]: CODESTRAL_LATEST.supports.input,
359
- [PIXTRAL_LARGE_LATEST.name]: PIXTRAL_LARGE_LATEST.supports.input,
360
- [PIXTRAL_12B_2409.name]: PIXTRAL_12B_2409.supports.input,
361
305
  [MAGISTRAL_MEDIUM_LATEST.name]: MAGISTRAL_MEDIUM_LATEST.supports.input,
362
306
  [MAGISTRAL_SMALL_LATEST.name]: MAGISTRAL_SMALL_LATEST.supports.input,
363
- [OPEN_MISTRAL_NEMO.name]: OPEN_MISTRAL_NEMO.supports.input,
364
307
  [MISTRAL_MEDIUM_3.name]: MISTRAL_MEDIUM_3.supports.input,
365
308
  [MISTRAL_SMALL_2503.name]: MISTRAL_SMALL_2503.supports.input,
366
309
  [CODESTRAL_2.name]: CODESTRAL_2.supports.input,
@@ -376,11 +319,8 @@ export type MistralChatModelProviderOptionsByName = {
376
319
  [MINISTRAL_8B_LATEST.name]: MistralTextProviderOptions
377
320
  [MINISTRAL_3B_LATEST.name]: MistralTextProviderOptions
378
321
  [CODESTRAL_LATEST.name]: MistralTextProviderOptions
379
- [PIXTRAL_LARGE_LATEST.name]: MistralVisionProviderOptions
380
- [PIXTRAL_12B_2409.name]: MistralVisionProviderOptions
381
322
  [MAGISTRAL_MEDIUM_LATEST.name]: MistralReasoningProviderOptions
382
323
  [MAGISTRAL_SMALL_LATEST.name]: MistralReasoningProviderOptions
383
- [OPEN_MISTRAL_NEMO.name]: MistralTextProviderOptions
384
324
  [MISTRAL_MEDIUM_3.name]: MistralVisionProviderOptions
385
325
  [MISTRAL_SMALL_2503.name]: MistralVisionProviderOptions
386
326
  [CODESTRAL_2.name]: MistralTextProviderOptions