You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -113,18 +114,27 @@ There are two related integrations in `@openai/agents-extensions`:
113
114
`@openai/agents-extensions/ai-sdk-ui` provides response helpers for wiring Agents SDK streams into AI SDK UI routes:
114
115
115
116
-`createAiSdkTextStreamResponse(source, options?)` for plain text streaming responses.
117
+
-`createAiSdkUiMessageStream(source)` for a lower-level `ReadableStream<UIMessageChunk>`.
116
118
-`createAiSdkUiMessageStreamResponse(source, options?)` for `UIMessageChunk` streaming responses.
117
119
118
-
Both helpers accept a `StreamedRunResult`, stream-like source, or compatible wrapper object and return a `Response` with streaming-friendly headers.
120
+
These helpers accept a `StreamedRunResult`, stream-like source, or compatible wrapper object. The response helpers return a `Response` with streaming-friendly headers.
119
121
120
-
Use `createAiSdkUiMessageStreamResponse(...)` when your UI needs structured chunks such as tool calls or reasoning parts. Use `createAiSdkTextStreamResponse(...)` when you only want plain text.
122
+
Use `createAiSdkUiMessageStreamResponse(...)` when your route should return the AI SDK response directly. Use `createAiSdkUiMessageStream(...)` when you want to own the response or rendering layer while still using the maintained Agents SDK to AI SDK `UIMessageChunk` translation. Use `createAiSdkTextStreamResponse(...)` when you only want plain text.
121
123
122
-
Both helpers also accept optional response settings through `options`:
124
+
The response helpers also accept optional response settings through `options`:
123
125
124
126
-`headers`: additional response headers to merge into the streaming response.
125
127
-`status`: the HTTP status code for the returned `Response`.
126
128
-`statusText`: the HTTP status text for the returned `Response`.
0 commit comments