◈
Editorial verdict
Choose AI SDK when a TypeScript product benefits from shared application primitives and its supported provider adapters. Deliberately choose between the current default Vercel AI Gateway path and direct provider packages; prefer a provider SDK when native capability fidelity matters more than portability.12
Best for
- TypeScript products that expect to evaluate or switch among supported model providers
- Teams that want shared application primitives for streaming, tools, and structured model output
- Products willing to test abstraction behavior whenever providers or model capabilities change
12Not ideal for
- Teams that require provider-specific APIs immediately when they are released
- Non-TypeScript systems that would add a separate service only to use the library
- Products treating an SDK abstraction as a substitute for model evaluation and operational controls
12Main trade-offA shared TypeScript interface and application primitives reduce repeated integration work while adding adapter, release, abstraction, and default-gateway dependencies that must be tested against each exact provider and model.12
AI SDK is an application library and provider abstraction. It does not supply models, model evaluation, provider contracts, safety policy, or production observability. String model references currently use Vercel AI Gateway by default; dedicated provider packages can call providers directly, and AI Gateway remains a separate Tool and commercial boundary.12
For: TypeScript teams building model-backed application features across one or more supported providers
- A required provider capability is not represented faithfully by an adapter.
- The application is not primarily TypeScript.
- A single provider and its newest native APIs are an intentional product boundary.
- The current default gateway route does not fit data, routing, pricing, or operational requirements.
Why teams consider AI SDK
- Provider abstractionSupported providers implement a shared language-model specification, which can reduce application-level switching work.1
- Application primitivesCore APIs cover model interaction patterns including text generation, streaming, tools, structured output, and embeddings.2
- Open-source package boundaryThe SDK can be inspected and adopted as application code without purchasing inference from the SDK itself.3
The open-source library has no separate software fee. Model providers, the selected gateway route, hosting, tools, storage, telemetry, and application operations create total cost; gateway and direct-provider billing must not be merged.3
Library and provider route
Open-source library with direct provider or gateway usage
Verified 2026-07-27: AI SDK has no separate inference fee; model and optional gateway usage are billed under the selected provider or gateway terms.3
- Library
- No separate open-source SDK inference charge3
- Default path
- String model references currently use Vercel AI Gateway3
- Total cost
- Provider or gateway usage plus hosting, tools, storage, telemetry, and operations3
OpenAI official SDK
- Choose when
- OpenAI is the intentional provider and direct access to current OpenAI APIs matters more than portability.
- Avoid when
- The application needs one interface across several providers.
- Compared with AI SDK
- First-party fidelity increases provider-specific code and migration work.9
Anthropic official SDK
- Choose when
- Claude is the intentional provider and native Messages, streaming, and tool semantics should remain explicit.
- Avoid when
- The application needs a shared provider abstraction.
- Compared with AI SDK
- Claude fidelity increases provider-specific integration and lifecycle dependence.10
Google Gen AI SDK
- Choose when
- Gemini is the selected platform and its current first-party SDK and backend boundary are deliberate.
- Avoid when
- The product expects frequent cross-provider switching.
- Compared with AI SDK
- First-party access improves Gemini fidelity while SDK and model lifecycle remain Google-specific.11
Official product, architecture, and pricing
- AI SDK providers and models
- AI SDK Core reference
- AI SDK license
Current provider and gateway boundary
- AI SDK choosing a provider
- AI SDK Gateway provider
- OpenAI SDKs and CLI
- Anthropic TypeScript SDK
- Gemini API libraries