If your agent is wired to one model provider and someone has asked what it would take to try another, this is for you. The short answer: the Vercel AI SDK makes the swap cheap for the steps you write in TypeScript, and it costs you a Node.js 22 and ESM upgrade to adopt version 7. It is not for a team that will stay on one provider for good: call that provider's own SDK.
What does the AI SDK solve, and what is it not?
Each model provider ships its own request shape, its own streaming format and its own way to declare tools. Wire a product to one of them and every later switch means rewriting the stream handling, the tool loop and the parsing. The AI SDK puts one TypeScript API in front of many providers. Vercel's product page says "Switch providers with one line of code". That is true of the code and, as the next section shows, not of the work.
The docs describe three parts. AI SDK Core generates text and structured objects, calls tools and runs agents. AI SDK UI is a set of hooks that stream chat into React, Vue or Svelte. AI SDK Harnesses run established agent harnesses such as Claude Code and Codex through one HarnessAgent interface.
What it is not matters as much. It is a library, ai on npm, open source under Apache-2.0, at version 7.0.142 on 16 October 2026. It is not a hosted service, so there is no SLA and no price. Your model bill comes from the provider or from AI Gateway, and your data goes wherever you run the code and whichever model endpoint you call.
When does it pay off, and when should you skip it?
It pays off where a model swap is likely, and it is overhead where it is not. Our rule is per step, not per vendor: an agent has steps that sort, steps that write and steps that act, and each one can sit on a different model.

The import line is the cheap part of a swap. The expensive part is knowing the new model is as good on your step: tool calls fire differently, structured output fails in new ways, and prompts tuned for one model drift on another. So the SDK does not remove the need for an eval set; it makes running one cheap. On a swap we run both models on the same real inputs in shadow mode, compare the answers and the cost per step, and switch only the steps where the new model holds. Provider-only settings, such as caching or reasoning options, go through each call's providerOptions, so they are visible in the code rather than hidden in the abstraction.
One more case pays off, and few guides mention it. Not every hop in an agent should be a writing model. A step that answers "which queue?" or "is this done?" is a decision, and a small decision model answers it faster than a model that writes. On 7 October 2026 Vercel put a decisions endpoint on AI Gateway, and its changelog shows the AI SDK calling it with experimental_decide. Jev, TypeSafe's decision model, is one of the models it names. So one SDK can hold the writing model and the gate model, which keeps a mixed stack in one codebase.
Our model-mix rule, from putting 200+ agents into production: a step whose answer is one of a fixed set (a queue, yes or no, a score) goes to a decision model. A step that fills a short, well-specified draft goes to a small writing model. A step that plans, reads long context or writes to a customer in their own words goes to a frontier model, with a person on the write. Own the routing rules, the eval set and the record of what was decided; rent the inference and the plumbing. The function is marked experimental, so pin the version. We set up Jev for clients (Jev page), so weigh that line with that in mind.
What does version 7 ask of your stack?
Version 7 shipped on 25 June 2026, and it asks for two things before anything else. Node.js 22 is the minimum, because the SDK relies on runtime APIs that were not backported. Imports must be ESM: Vercel's changelog says CommonJS require() is not supported. An older Express service that still uses require has to move first.
What you get for the upgrade is the agent plumbing many teams wrote by hand:
- Tool approvals. A call or an agent can mark a tool as needing user approval, auto-approve, auto-deny, or hand the choice to your own typed function.
- Durable runs.
WorkflowAgentkeeps an agent's state between steps, so it survives a deploy, a restart or an approval that waits. - Telemetry.
@ai-sdk/otelemits OpenTelemetry spans for model calls, steps and tools. - Sandbox support. A tool can run commands in a sandbox, including Vercel Sandbox.
Realtime voice and video generation are marked experimental in the same changelog. Do not plan a production voice line on them yet.

Vercel ships codemods and a migration guide for most import and rename changes. Run them on a branch, then read the semantic items yourself. A codemod changes names; it does not tell you whether an approval now fires where it used to.
What does it cost to run, and where does the data go?
The library costs nothing. The cost is the model tokens and the place you run it, and both decide where your data goes.
- Tokens. Through the provider's own key, you pay that provider. Through AI Gateway, Vercel says it adds no markup to provider token prices; team-wide zero data retention and provider allowlists cost $0.10 per 1,000 requests each on Pro and Enterprise. Our post on AI Gateway costs has the full fee table.
- Hosting. It runs anywhere Node.js 22 runs. On Vercel Functions, Vercel lists 19 compute regions and none is in the UAE or Saudi Arabia. Mumbai (
bom1) is the nearest, and the default is Washington, D.C. (iad1). - Inference region. If you route models through AI Gateway, the inference region can be pinned to the US or the EU only. Left unset, it is "global" and may run outside your users' jurisdiction.
To say which step costs what, measure it per step. Version 7's @ai-sdk/otel package emits spans and metrics in the OpenTelemetry GenAI conventions for each model call, step and tool, so your collector can attribute token use to the step that spent it. Price those tokens per model and you have cost per step; add the outcome from the record and you have cost per outcome. If you route through AI Gateway, its logs add provider, tokens and cost per request, and per-request zero data retention is free on Pro and Enterprise. Neither Vercel page we read gives a latency figure for the layer or the gateway hop, and we will not guess one: we measure p50 and p95 per step in shadow mode, on your traffic, before go-live.
So a Dubai or Riyadh team that needs prompts to stay in-country cannot get that from a hosted Vercel setup today. We confirm the data path per project, in writing, before you sign. That may mean the AI SDK on your own Gulf server, calling a model endpoint you have checked.
What does it look like on a Dubai brokerage's lead replies?
Here is a sample plan, labelled as one, for a brokerage where portal leads arrive on WhatsApp and wait until morning. It is the shape we would write in the assessment, not a client deployment.
- 01A portal lead arrives on WhatsApp. A small decision model sorts it: buyer, tenant, landlord or spam.
- 02A writing model drafts a reply in the lead's language, with the listing they asked about.
- 03The agent proposes a new lead record in Salesforce. A tool approval holds the write for a broker.
- 04The broker approves on their phone. The record is written with the broker as owner, and the trace keeps who approved.

The AI SDK earns its place on steps 1 and 2. Those are the two models you are most likely to change as prices and languages move, and changing one is a model string, not a rewrite. Step 3 is where the risk sits: the write. The approval is in the SDK, but who approves, and on which fields, is your process to name. For the brokerage side of this, see Mindcat for real estate brokers and our WhatsApp page.
What should you check before you commit?
Five checks, in this order, before the AI SDK goes into a production agent:
- Runtime. Every service that will import it runs Node.js 22 or later, and uses ESM.
- The swap you expect. Name the step and the model you would try next. If you cannot name one, call the provider directly.
- The write. Each tool that writes to a system of record has an approval policy, tested with a rejected approval as well as an approved one.
- The data path. Write down where the code runs and which model endpoint each step calls. For the Gulf, that line decides more than the SDK does.
- Experimental labels. List every experimental function you use, pin the version, and re-test on each upgrade.
How do we start?
We call the method Spec, shadow, gate: we write the steps and the data path down, run the agent beside your team without writing anything, then put a person on the write. The written assessment is free and says which steps need the AI SDK and which do not. The first build week is a fixed AED/SAR 14,900, credited in full if you sign the build within 60 days, and our Run plans are on one page. See how we build on Vercel for the rest.
We are not a Vercel partner; we use the product's own names, and mindcat.ai itself runs on Netlify. If you have no agent step with a model you would change and no front end to stream into, you do not need this layer yet: call your provider directly and come back when a second model is on the table.

