aisdk/vercel

Official Vercel AI Gateway provider for the PHP AI SDK.

Maintainers

Package info

github.com/phpaisdk/vercel

pkg:composer/aisdk/vercel

Transparency log

Fund package maintenance!

Open Collective

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.8.1 2026-07-22 06:36 UTC

This package is auto-updated.

Last update: 2026-07-22 06:52:09 UTC


README

GitHub Workflow Status Latest Version License

Official Vercel AI Gateway provider for the PHP AI SDK. Uses Vercel's OpenAI-compatible Chat Completions API.

Installation

composer require aisdk/vercel

Basic Usage

use AiSdk\Generate;
use AiSdk\Vercel;

Vercel::create(['apiKey' => $_ENV['AI_GATEWAY_API_KEY']]);

$result = Generate::text('Explain this code briefly.')
    ->model(Vercel::model('anthropic/claude-sonnet-4.5'))
    ->run();

Configuration

Variable Description Default
AI_GATEWAY_API_KEY Vercel AI Gateway API key Required
VERCEL_BASE_URL Base URL for API requests https://ai-gateway.vercel.sh/v1

Supported Capabilities

Capability Support
Text generation and streaming Native OpenAI-compatible chat
Tool calling, structured output, reasoning Passed through for selected gateway models
Image input Passed through for compatible gateway models

Provider Options

Use providerOptions('vercel', ['raw' => [...]]) for documented AI Gateway fields outside the portable SDK surface. Model IDs use Vercel's provider/model form and remain opaque strings.

Documentation