Home / Companies / LogRocket / Blog / Post Details
Content Deep Dive

Building an AI chat app in Nuxt with the Vercel AI SDK and Cloudflare Workers AI

Blog post from LogRocket

Post Details
Company
Date Published
Author
Ikeh Akinyemi
Word Count
2,421
Company Posts That Month
22
Language
-
Hacker News Points
-
Post removed?
No
Summary

Building a Nuxt AI chat application in 2026 can combine the Vercel AI SDK for typed streaming and Vue reactive composables, Nuxt UI and Comark for chat controls and progressively rendered Markdown, and Cloudflare Workers AI for edge-hosted inference. The approach begins with a Nitro server route using Vercel AI Gateway, keeping API keys on the server while converting UI messages into model messages and returning server-sent typed streams consumed by the `useChat` composable. Nuxt UI components then render message parts, reasoning blocks, tool states, stop and retry controls, and syntax-highlighted streamed Markdown with minimal custom interface code. Moving from Gateway to Workers AI requires mainly replacing the provider and model identifier, configuring a Cloudflare AI binding and Nitro’s Cloudflare preset, while preserving the same stream format, client composables, and UI. Deployment uses Wrangler to publish the Worker and static assets, with request monitoring available through Wrangler logs. A sample benchmark found lower first-token latency and higher throughput for a Workers AI Llama model than for a Gateway reasoning model, although the comparison is qualified because the models have different behavior and capabilities.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Real-time 10 4,120 979 214 -36%
Local AI 1 189 46 24 -16%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.