generateText
A method invocation entry point in the AI SDK that waits for the model's complete result and then processes the returned content in a single pass, supporting multimodal output.
Core Facts
Timeline (last 90 days)
For generateText, the time to first byte equals the full generation time, whereas streamText spreads the wait across the entire generation process.
Developers use the model name google/gemini-omni-1.2-flash to call Gemini Omni 1.2 Flash via the generateText or streamText methods in the AI SDK, and the generated video is returned as a file.
Patch versions do not ship new interfaces and have zero intrusion on application code; developers do not need to change any calling method after upgrading, and the input and output parameters of interfaces such as generateText and streamText remain stable.
The corresponding fix commit is 3d6ac0a, which maps incomplete_details.reason to the finish reason for generateText calls in Responses mode.
The AI SDK uses a layered design: the core layer (the ai package) provides unified interfaces such as streamText and generateText, and each model vendor integrates through a separate provider package.
Projects using Valibot can use @ai-sdk/valibot to perform type-safe validation of tool parameters in calls such as generateText and streamText.
@ai-sdk/tool-web-fetch is a standard tool that can be mounted directly into the tools parameter of streamText or generateText without additional adaptation.
In generateText, streamText, and WorkflowAgent, the SDK rejects tool calls directly before local execution, even if the model returned a tool call intent.
In the AI SDK, developers use unified core functions such as generateText, streamText and generateObject, and which provider's model is actually called is determined by the provider instance
Updates to internal utility packages such as workflow-harness are imperceptible to most developers using the upper-level API and do not change the way generateText, streamText, or Agent workflows are called.
1 more timeline events
All Facts (11)
The AI SDK uses a layered design: the core layer (the ai package) provides unified interfaces such as streamText and generateText, and each model vendor integrates through a separate provider package.
80%UnverifiedFor generateText, the time to first byte equals the full generation time, whereas streamText spreads the wait across the entire generation process.
50%UnverifiedDevelopers use the model name google/gemini-omni-1.2-flash to call Gemini Omni 1.2 Flash via the generateText or streamText methods in the AI SDK, and the generated video is returned as a file.
50%UnverifiedPatch versions do not ship new interfaces and have zero intrusion on application code; developers do not need to change any calling method after upgrading, and the input and output parameters of interfaces such as generateText and streamText remain stable.
50%UnverifiedThe corresponding fix commit is 3d6ac0a, which maps incomplete_details.reason to the finish reason for generateText calls in Responses mode.
50%UnverifiedProjects using Valibot can use @ai-sdk/valibot to perform type-safe validation of tool parameters in calls such as generateText and streamText.
50%Unverified@ai-sdk/tool-web-fetch is a standard tool that can be mounted directly into the tools parameter of streamText or generateText without additional adaptation.
50%UnverifiedIn generateText, streamText, and WorkflowAgent, the SDK rejects tool calls directly before local execution, even if the model returned a tool call intent.
50%UnverifiedIn the AI SDK, developers use unified core functions such as generateText, streamText and generateObject, and which provider's model is actually called is determined by the provider instance
50%UnverifiedUpdates to internal utility packages such as workflow-harness are imperceptible to most developers using the upper-level API and do not change the way generateText, streamText, or Agent workflows are called.
50%UnverifiedVercel AI SDK wraps tool calling into a unified generateText/streamText API, where developers only need to declare the tool's JSON Schema without manually managing the finish_reason: tool_calls state machine.
50%