@devries-cameron20 / composio Mirror · read-only / commits / 880fbbf32
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 22, 09:30 UTC

docs: Use generateText + stopWhen (latest Vercel AI SDK paradigm)

- Switch from streamText to generateText for simplicity - Fix text/code mismatch: now both reference stopWhen - Link to Vercel AI SDK tool calling docs - Tested e2e: email sent successfully Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Sushmithamallesh committed Feb 17, 2026 at 14:57 UTC 880fbbf32557947d7e189c8c7fa96e297b9ff768
1 file changed +4 -6
docs/content/docs/providers/vercel.mdx
+4 -6
@@ -35,14 +35,14 @@ ANTHROPIC_API_KEY=xxxxxxxxx
35 <Step>
36 **Create session and run**
37
38 -The Vercel provider is **agentic** — tools include an `execute` function, so the AI SDK handles tool calls automatically via `maxSteps`.
38 +The Vercel provider is **agentic** — tools include an `execute` function, so the AI SDK handles tool calls automatically via [`stopWhen`](https://ai-sdk.dev/docs/ai-sdk-core/tools-and-tool-calling).
39
40 ```typescript
41 // @noErrors
42 import { anthropic } from "@ai-sdk/anthropic";
43 import { Composio } from "@composio/core";
44 import { VercelProvider } from "@composio/vercel";
45 -import { streamText, stepCountIs } from "ai";
45 +import { generateText, stepCountIs } from "ai";
46
47 const composio = new Composio({ provider: new VercelProvider() });
48
@@ -50,16 +50,14 @@ const composio = new Composio({ provider: new VercelProvider() });
50 const session = await composio.create("user_123");
51 const tools = await session.tools();
52
53 -const stream = await streamText({
53 +const { text } = await generateText({
54 model: anthropic("claude-opus-4-6"),
55 tools,
56 prompt: "Send an email to john@example.com with the subject 'Hello' and body 'Hello from Composio!'",
57 stopWhen: stepCountIs(10),
58 });
59
60 -for await (const textPart of stream.textStream) {
61 - process.stdout.write(textPart);
62 -}
60 +console.log(text);
61 ```
62 </Step>
63 </Steps>