Skip to content

Commit 0235765

Browse files
authored
docs: update v5 announcement page (vercel#6599)
## Background Some APIs changed and v5 site is launched. ## Summary Updated continueUntil to stopWhen and added reference to new v5 site. ## Tasks - [x] Formatting issues have been fixed (run `pnpm prettier-fix` in the project root)
1 parent 81ef251 commit 0235765

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

  • content/docs/01-announcing-ai-sdk-5-alpha

content/docs/01-announcing-ai-sdk-5-alpha/index.mdx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ description: Get started with the Alpha version of AI SDK 5.
88
<Note type="warning">
99
This is an early preview — AI SDK 5 is under active development. APIs may
1010
change without notice. Pin to specific versions as breaking changes may occur
11-
even in patch releases.
11+
even in patch releases. To learn more, check out the [v5
12+
docs](https://v5.ai-sdk.dev)
1213
</Note>
1314

1415
## Alpha Version Guidance
@@ -34,6 +35,8 @@ During this Alpha phase, we expect to make significant, potentially breaking cha
3435
reliable.
3536
</Note>
3637

38+
To learn more, check out the [v5 docs](https://v5.ai-sdk.dev).
39+
3740
## Installation
3841

3942
To install the AI SDK 5 - Alpha, run the following command:
@@ -348,9 +351,9 @@ const result = await generateText({
348351

349352
This makes it easier to build AI systems that adapt their capabilities based on the current context and task requirements.
350353

351-
### continueUntil
354+
### `stopWhen`
352355

353-
The `continueUntil` parameter lets you define stopping conditions for your agent. Instead of running indefinitely, you can specify exactly when the agent should terminate based on various conditions:
356+
The `stopWhen` parameter lets you define stopping conditions for your agent. Instead of running indefinitely, you can specify exactly when the agent should terminate based on various conditions:
354357

355358
- Reaching a maximum number of steps
356359
- Calling a specific tool
@@ -360,19 +363,19 @@ The `continueUntil` parameter lets you define stopping conditions for your agent
360363
const result = generateText({
361364
// ...
362365
// stop loop at 5 steps
363-
continueUntil: maxSteps(5),
366+
stopWhen: stepCountIs(5),
364367
});
365368

366369
const result = generateText({
367370
// ...
368371
// stop loop when weather tool called
369-
continueUntil: hasToolCall('weather'),
372+
stopWhen: hasToolCall('weather'),
370373
});
371374

372375
const result = generateText({
373376
// ...
374377
// stop loop at your own custom condition
375-
continueUntil: maxTotalTokens(20000),
378+
stopWhen: maxTotalTokens(20000),
376379
});
377380
```
378381

0 commit comments

Comments
 (0)