Skip to content

Commit 1a296db

Browse files
authored
Update ai-sdk document page after releasing #356 (#369)
* Update ai-sdk document page after releasing #356 * tweak
1 parent 55f346a commit 1a296db

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

docs/src/content/docs/extensions/ai-sdk.mdx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ import aiSdkSetupExample from '../../../../../examples/docs/extensions/ai-sdk-se
1313
quickly.
1414
</Aside>
1515

16-
Out of the box the Agents SDK works with OpenAI models through the Responses API or Chat
17-
Completions API. However, if you would like to use another model, the [Vercel's AI SDK](https://sdk.vercel.ai/) offers a range
18-
of supported models that can be brought into the Agents SDK through this adapter.
16+
Out of the box the Agents SDK works with OpenAI models through the Responses API or Chat Completions API. However, if you would like to use another model, the [Vercel's AI SDK](https://sdk.vercel.ai/) offers a range of supported models that can be brought into the Agents SDK through this adapter.
1917

2018
## Setup
2119

@@ -30,7 +28,7 @@ of supported models that can be brought into the Agents SDK through this adapter
3028
2. Choose your desired model package from the [Vercel's AI SDK](https://ai-sdk.dev/docs/foundations/providers-and-models) and install it:
3129

3230
```bash
33-
npm install @ai-sdk/openai@"^1.0.0"
31+
npm install @ai-sdk/openai
3432
```
3533

3634
3. Import the adapter and model to connect to your agent:
@@ -49,8 +47,11 @@ of supported models that can be brought into the Agents SDK through this adapter
4947
</Steps>
5048

5149
<Aside type="caution">
52-
Vercel's AI SDK has recently migrated to v2, however openai agent extensions is not yet compatible with v2.
53-
Therefore v1 versions of Vercel's AI SDK has to be installed.
50+
We currently support ai-sdk's model provider v2 modules, which are compatible
51+
with Vercel AI SDK v5. If you have a specific reason to continue using the v1
52+
model providers, you can copy the module from
53+
[examples/ai-sdk-v1](https://github.com/openai/openai-agents-js/tree/main/examples/ai-sdk-v1)
54+
and include it in your project.
5455
</Aside>
5556

5657
## Example
@@ -59,9 +60,7 @@ of supported models that can be brought into the Agents SDK through this adapter
5960

6061
## Passing provider metadata
6162

62-
If you need to send provider-specific options with a message, pass them through
63-
`providerMetadata`. The values are forwarded directly to the underlying AI SDK
64-
model. For example, the following `providerData` in the Agents SDK
63+
If you need to send provider-specific options with a message, pass them through `providerMetadata`. The values are forwarded directly to the underlying AI SDK model. For example, the following `providerData` in the Agents SDK
6564

6665
```ts
6766
providerData: {

0 commit comments

Comments
 (0)