From f4ed16bfd1829f5b0e48ca29acf71973b3a5d6dc Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 18 Jan 2026 18:38:46 +0000 Subject: [PATCH] docs: update model recommendations and comparison - Updated `apps/web/app/docs/ai-sdk/page.tsx` and `apps/web/app/docs/quick-start/page.tsx` to use `process.env.AI_GATEWAY_MODEL` with a fallback to `anthropic/claude-haiku-4.5`. - Added a "Choosing a Model" section to `apps/web/app/docs/ai-sdk/page.tsx` with a cost/quality comparison table for Haiku, Sonnet, and Opus. - Added a link to the Vercel AI Gateway model list in the documentation. --- apps/web/app/docs/ai-sdk/page.tsx | 56 +++++++++++++++++++++++++- apps/web/app/docs/quick-start/page.tsx | 2 +- 2 files changed, 56 insertions(+), 2 deletions(-) diff --git a/apps/web/app/docs/ai-sdk/page.tsx b/apps/web/app/docs/ai-sdk/page.tsx index 9dbd4add..aee8eae3 100644 --- a/apps/web/app/docs/ai-sdk/page.tsx +++ b/apps/web/app/docs/ai-sdk/page.tsx @@ -33,7 +33,7 @@ export async function POST(req: Request) { : ''; const result = streamText({ - model: 'anthropic/claude-haiku-4.5', + model: process.env.AI_GATEWAY_MODEL || 'anthropic/claude-haiku-4.5', system: systemPrompt + contextPrompt, prompt, }); @@ -46,6 +46,60 @@ export async function POST(req: Request) { }); }`} +
+ We recommend starting with smaller, faster models like Haiku for most UI
+ generation tasks. Use the{" "}
+ AI_GATEWAY_MODEL environment
+ variable to switch models without changing code.
+
| Model | +Best For | +Cost | +Speed | +
|---|---|---|---|
| claude-haiku-4.5 | +Most UI tasks, fast iterations | +$ | +Fastest | +
| claude-3-5-sonnet | +Complex logic, creative layouts | +$$ | +Fast | +
| claude-3-opus | +Complex reasoning (overkill for UI) | +$$$ | +Slow | +
+ See the full list of available models in the{" "} + + Vercel AI Gateway documentation + + . +
+
Use useUIStream on the client:
diff --git a/apps/web/app/docs/quick-start/page.tsx b/apps/web/app/docs/quick-start/page.tsx
index 9852384e..298eeef4 100644
--- a/apps/web/app/docs/quick-start/page.tsx
+++ b/apps/web/app/docs/quick-start/page.tsx
@@ -100,7 +100,7 @@ export async function POST(req: Request) {
const systemPrompt = generateCatalogPrompt(catalog);
const result = streamText({
- model: 'anthropic/claude-haiku-4.5',
+ model: process.env.AI_GATEWAY_MODEL || 'anthropic/claude-haiku-4.5',
system: systemPrompt,
prompt,
});