import { type Fetcher } from "@mistralai/mistralai"; import type { SimpleStreamOptions, StreamFunction, StreamOptions } from "../types.js"; /** * Builds a `Fetcher` that wraps the default `fetch` with a 16 MiB byte cap * on streamed response bodies. The wrapped `Response.body` exposes a * `ReadableStream` whose chunks flow through `createSseByteGuard`, so the * SDK's internal SSE parser (`EventStream` in * `@mistralai/mistralai/lib/event-streams.ts`) reads exactly as it would on * an unbounded body — but bounded. * * Bodyless responses (no `body` or no `getReader`) are returned unchanged so * the SDK's error-path `res.arrayBuffer()` call still works. */ export declare function createBoundedMistralFetcher(maxBytes?: number, upstreamFetch?: Fetcher): Fetcher; /** * Provider-specific options for the Mistral API. */ type MistralReasoningEffort = "none" | "high"; interface MistralOptions extends StreamOptions { toolChoice?: "auto" | "none" | "any" | "required" | { type: "function"; function: { name: string; }; }; promptMode?: "reasoning"; reasoningEffort?: MistralReasoningEffort; } /** * Stream responses from Mistral using `chat.stream`. */ export declare const streamMistral: StreamFunction<"mistral-conversations", MistralOptions>; /** * Maps provider-agnostic `SimpleStreamOptions` to Mistral options. */ export declare const streamSimpleMistral: StreamFunction<"mistral-conversations", SimpleStreamOptions>; export {};