File: render.md | Updated: 11/15/2025
Menu
v5 (Latest)
AI SDK 5.x
Model Context Protocol (MCP) Tools
Copy markdown
=========================================================================================
"render" has been removed in AI SDK 4.0.
AI SDK RSC is currently experimental. We recommend using AI SDK UI for production. For guidance on migrating from RSC to UI, see our migration guide .
A helper function to create a streamable UI from LLM providers. This function is similar to AI SDK Core APIs and supports the same model interfaces.
Note:
renderhas been deprecated in favor ofstreamUI. During migration, please ensure that themessagesparameter follows the updated specification .
import { render } from "@ai-sdk/rsc"
string
Model identifier, must be OpenAI SDK compatible.
provider client
Currently the only provider available is OpenAI. This needs to match the model name.
ReactNode
The initial UI to render.
Array<SystemMessage | UserMessage | AssistantMessage | ToolMessage>
A list of messages that represent a conversation.
SystemMessage
'system'
The role for the system message.
string
The content of the message.
UserMessage
'user'
The role for the user message.
string
The content of the message.
AssistantMessage
'assistant'
The role for the assistant message.
string
The content of the message.
ToolCall[]
A list of tool calls made by the model.
ToolCall
string
The id of the tool call.
'function'
The type of the tool call.
Function
The function to call.
Function
string
The name of the function.
string
The arguments of the function.
ToolMessage
'tool'
The role for the tool message.
string
The content of the message.
string
The id of the tool call.
ToolSet
Tools that are accessible to and can be called by the model.
Tool
string
Information about the purpose of the tool including details on how and when it can be used by the model.
zod schema
The typed schema that describes the parameters of the tool that can also be used to validation and error handling.
async (parameters) => any
An async function that is called with the arguments from the tool call and produces a result.
ToolSet
Tools that are accessible to and can be called by the model.
Tool
string
Information about the purpose of the tool including details on how and when it can be used by the model.
zod schema
The typed schema that describes the parameters of the tool that can also be used to validation and error handling.
async (parameters) => any
An async function that is called with the arguments from the tool call and produces a result.
(Text) => ReactNode
Callback to handle the generated tokens from the model.
Text
string
The full content of the completion.
string
The delta.
boolean
Is it done?
number
The temperature to use for the model.
It can return any valid ReactNode.
On this page
Deploy and Scale AI Apps with Vercel.
Vercel delivers the infrastructure and developer experience you need to ship reliable AI-powered applications at scale.
Trusted by industry leaders: