Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions examples/ai-sdk-ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

This example shows how to convert an Agents SDK streaming run into responses that are compatible with the AI SDK UI data stream and text stream protocols.

This private example uses AI SDK 7 with `@ai-sdk/react` 4 and `@ai-sdk/openai` 4. The published Agents SDK extension continues to support AI SDK 6 and 7; this example migration does not require existing consumers to upgrade. Applications choosing to upgrade should follow the [AI SDK 7 migration guide](https://ai-sdk.dev/docs/migration-guides/migration-guide-7-0).

## Run the Next.js chat UI

```bash
Expand Down
6 changes: 3 additions & 3 deletions examples/ai-sdk-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"private": true,
"name": "ai-sdk-ui",
"dependencies": {
"@ai-sdk/react": "^3.0.280",
"@ai-sdk/react": "^4.0.0",
"@openai/agents": "workspace:*",
"@openai/agents-extensions": "workspace:*",
"@openai/agents-openai": "workspace:*",
"ai": "^6.0.277",
"ai": "^7.0.0",
"next": "16.3.8",
"react": "^19.3.0",
"react-dom": "^19.3.0",
Expand All @@ -25,7 +25,7 @@
"start:script-ai-sdk": "node scripts/ai-sdk.ts"
},
"devDependencies": {
"@ai-sdk/openai": "^3.0.109",
"@ai-sdk/openai": "^4.0.83",
Comment thread
jbeckwith-oai marked this conversation as resolved.
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
Expand Down
2 changes: 1 addition & 1 deletion examples/ai-sdk-ui/scripts/ai-sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { createAiSdkTextStreamResponse } from '@openai/agents-extensions/ai-sdk-
async function main() {
const result = streamText({
model: openai('gpt-4.1'),
system: 'Respond with three short sentences.',
instructions: 'Respond with three short sentences.',
prompt: 'Tell me about stars.',
});

Expand Down
2 changes: 1 addition & 1 deletion examples/ai-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"dependencies": {
"@ai-sdk/anthropic": "^3.0.116",
"@ai-sdk/google": "^4.0.79",
"@ai-sdk/openai": "^3.0.109",
"@ai-sdk/openai": "^4.0.83",
"@openai/agents": "workspace:*",
"@openai/agents-extensions": "workspace:*",
"@openrouter/ai-sdk-provider": "^2.9.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"private": true,
"name": "docs-code",
"dependencies": {
"@ai-sdk/openai": "^4.0.60",
"@ai-sdk/openai": "^4.0.83",
"@modelcontextprotocol/server-filesystem": "^2026.8.31",
"@openai/agents": "workspace:*",
"@openai/agents-core": "workspace:*",
Expand Down
16 changes: 16 additions & 0 deletions patches/eventsource-parser@3.1.1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/package.json b/package.json
index a5380e81d36c671c0cdca442b6f7f4ce2dd5fdcd..3edf421614b8d73250c5c0abffcc62ebf9c0cfa8 100644
--- a/package.json
+++ b/package.json
@@ -29,6 +29,11 @@
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
+ "typesVersions": {
+ "*": {
+ "stream": ["./dist/stream.d.ts"]
+ }
+ },
"exports": {
".": {
"source": "./src/index.ts",
144 changes: 95 additions & 49 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,5 @@ patchedDependencies:
# Preserve Prisma 6's BEGIN IMMEDIATE behavior and release on begin failure.
# Recheck the contention tests before removing this patch on an adapter update.
'@prisma/adapter-better-sqlite3@7.10.0': patches/@prisma__adapter-better-sqlite3@7.10.0.patch
# Restore the stream type mapping for TypeScript node resolution until upstream restores it.
eventsource-parser@3.1.1: patches/eventsource-parser@3.1.1.patch
Loading