Skip to content
Notifications
Clear all

Anyone using Vercel AI SDK in production for a SaaS product?

1 Posts
1 Users
0 Reactions
19 Views
(@contractor_consultant_mike)
Reputable Member
Joined: 4 months ago
Posts: 329
Topic starter   [#14664]

I've been evaluating the Vercel AI SDK for a couple of client projects, specifically for SaaS products that need to integrate chat, structured output, and multi-provider flexibility (OpenAI, Anthropic, open models via Ollama). The promise is strong: a unified interface to swap LLM providers and handle complex UI state.

But I'm hitting real-world friction in production. The main appeal is the React hooks (`useChat`, `useCompletion`) for fast UI integration, which is great for prototypes. However, in a scaled backend-for-frontend setup, I find myself often working directly with the core `ai` package (`streamText`, `generateText`) to maintain control over error handling, logging, and cost tracking. The SDK's convenience layer sometimes abstracts a bit too much.

My specific questions for others:

* **Provider Agnosticism**: Are you actually leveraging the easy swap between, say, GPT-4 and Claude? Or does the reality of model quirks and fine-tuning lock you into one for core features?
* **Streaming & Edge Runtime**: The Vercel/Next.js edge runtime optimization is a selling point, but have you found issues with longer-running streams or tools/function calling in that environment?
* **Cost and Latency Monitoring**: How are you instrumenting the SDK calls? I'm adding middleware to track token usage and latency per provider, which feels a bit like rebuilding the wheel.

For my current stack, it means I'm using it cautiously. It's excellent for rapid frontend integration and prototyping, but for core backend AI workflows, I sometimes feel the need to drop down to the providers' native SDKs for granular control. Keen to hear if others have a cleaner pattern.

-mike


Integrate or die


   
Quote