# @ai-sdk/gateway

Latest version **4.0.87** (published 2026-09-18) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @ai-sdk/gateway
pnpm add @ai-sdk/gateway
yarn add @ai-sdk/gateway
bun add @ai-sdk/gateway
```

## Health

**Score 60/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score; popular repo.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 4.0.87 |
| Published | 2026-09-18 |
| First published | 2025-05-28 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 26864 |
| Maintainers | vercel-release-bot, matheuss, matt.straka |
| Keywords | ai |

## Links

- npm: https://www.npmjs.com/package/@ai-sdk/gateway
- Repository: https://github.com/vercel/ai
- Homepage: https://ai-sdk.dev/docs
- Issues: https://github.com/vercel/ai/issues
- npm.io page: https://npm.io/package/@ai-sdk/gateway

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 4.0.87 (latest) — 2026-09-18
- 3.0.196 (ai-v6) — 2026-09-16
- 2.0.153 (ai-v5) — 2026-09-16
- 0.0.0-f1630544-20260811180950 (snapshot) — 2026-08-11
- 4.0.0-beta.114 (beta) — 2026-06-24
- 4.0.0-canary.107 (canary) — 2026-06-15
- 1.0.0-alpha.6 (alpha) — 2025-05-28
- 4.0.86 — 2026-09-18
- 4.0.85 — 2026-09-16
- 4.0.84 — 2026-09-16
- 3.0.195 — 2026-09-16
- 4.0.83 — 2026-09-16
- 4.0.82 — 2026-09-15
- 4.0.81 — 2026-09-14
- 3.0.194 — 2026-09-14
- … 707 more at https://npm.io/package/@ai-sdk/gateway/versions

## README

# AI SDK - Gateway Provider

The Gateway provider for the [AI SDK](https://ai-sdk.dev/docs) allows the use of a wide variety of AI models and providers.

## Setup

The Gateway provider is available in the `@ai-sdk/gateway` module. You can install it with

```bash
npm i @ai-sdk/gateway
```

## Skill for Coding Agents

If you use coding agents such as Claude Code or Cursor, we highly recommend adding the AI SDK skill to your repository:

```shell
npx skills add vercel/ai
```

## Provider Instance

You can import the default provider instance `gateway` from `@ai-sdk/gateway`:

```ts
import { gateway } from '@ai-sdk/gateway';
```

## Example

```ts
import { gateway } from '@ai-sdk/gateway';
import { generateText } from 'ai';

const { text } = await generateText({
  model: gateway('xai/grok-4.6'),
  prompt:
    'Tell me about the history of the San Francisco Mission-style burrito.',
});
```

## Documentation

Please check out the [AI SDK documentation](https://ai-sdk.dev/docs) for more information.

---
_Source: https://npm.io/package/@ai-sdk/gateway · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
