Skip to content

Commit 9c7af72

Browse files
committed
Update vercel-ai-frontend.mdx
1 parent 0ebdf91 commit 9c7af72

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

apps/docs/content/docs/vercel-ai-frontend.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Add `AI_GATEWAY_API_KEY` to your environment:
5858
AI_GATEWAY_API_KEY=your_api_key_here
5959
```
6060

61-
Then use it with the AI SDK by specifying a model string e.g. `openai/gpt-4o`.
61+
Then use it with the AI SDK by specifying a model string e.g. `anthropic/claude-sonnet-4.5`.
6262

6363
## AI SDK
6464

@@ -112,8 +112,9 @@ export async function POST(req: Request) {
112112
const { messages } = await req.json();
113113

114114
const result = streamText({
115-
model: "openai/gpt-4o",
116-
messages,
115+
model: "anthropic/claude-sonnet-4.5",
116+
system: "You are a helpful assistant.",
117+
messages: await convertToModelMessages(messages),
117118
});
118119

119120
return result.toUIMessageStreamResponse();

0 commit comments

Comments
 (0)