This function is a wrapper over the AI SDK's streamText.
The prompt file sets model, messages, temperature, maxTokens, and providerOptions.
AI SDK-compatible tools are accepted structurally via CompatibleToolSet. Other AI SDK
streamText options are accepted via StreamTextAiSdkOptions, except onFinish, which
Output wraps to add optional cost data.
Use an LLM model to stream text generation.
This function is a wrapper over the AI SDK's
streamText. The prompt file setsmodel,messages,temperature,maxTokens, andproviderOptions. AI SDK-compatibletoolsare accepted structurally via CompatibleToolSet. Other AI SDKstreamTextoptions are accepted via StreamTextAiSdkOptions, exceptonFinish, which Output wraps to add optional cost data.