npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@elizaos/plugin-vercel-ai-gateway-root

v2.0.0-alpha.1

Published

Vercel AI Gateway plugin for elizaOS. Provides access to AI models through the Vercel AI Gateway with zero markup.

Readme

@elizaos/plugin-gateway

Vercel AI Gateway plugin for elizaOS. Provides access to AI models through the Vercel AI Gateway with zero markup.

Features

  • Text Generation: TEXT_SMALL, TEXT_LARGE chat completions
  • Embeddings: Vector embeddings generation
  • Images: Image generation and description
  • Structured Output: JSON object generation
  • Streaming: Real-time streaming support

Multi-Language Support

This plugin is available in three languages with full feature parity:

| Language | Directory | Package Name | | ---------- | ------------- | ------------------------- | | TypeScript | typescript/ | @elizaos/plugin-gateway | | Python | python/ | elizaos-plugin-gateway | | Rust | rust/ | elizaos-plugin-gateway |

Installation

TypeScript

npm install @elizaos/plugin-gateway
# or
bun add @elizaos/plugin-gateway

Python

pip install elizaos-plugin-gateway

Rust

[dependencies]
elizaos-plugin-gateway = "1.0"

Quick Start

TypeScript

import { gatewayPlugin } from "@elizaos/plugin-gateway";
import { createAgent } from "@elizaos/core";

const agent = createAgent({
  plugins: [gatewayPlugin],
});

// Use via runtime
const text = await runtime.useModel(ModelType.TEXT_LARGE, {
  prompt: "What is quantum computing?",
});

Python

from elizaos_plugin_gateway import GatewayPlugin

async with GatewayPlugin() as plugin:
    response = await plugin.generate_text_large("What is quantum computing?")
    print(response)

Rust

use elizaos_plugin_gateway::{get_gateway_plugin, TextGenerationParams};
use futures::StreamExt;

let plugin = get_gateway_plugin()?;

// Standard text generation
let response = plugin.generate_text("What is quantum computing?").await?;
println!("{}", response);

// Streaming text generation
let params = TextGenerationParams::new("Tell me a story");
let mut stream = plugin.stream_text(&params).await?;
while let Some(chunk) = stream.next().await {
    print!("{}", chunk?);
}

Configuration

Set environment variables:

# Required - one of:
export AI_GATEWAY_API_KEY="your-api-key"
export AIGATEWAY_API_KEY="your-api-key"
export VERCEL_OIDC_TOKEN="your-oidc-token"

# Optional
export AI_GATEWAY_BASE_URL="https://ai-gateway.vercel.sh/v1"
export AI_GATEWAY_SMALL_MODEL="gpt-5-mini"
export AI_GATEWAY_LARGE_MODEL="gpt-5"
export AI_GATEWAY_EMBEDDING_MODEL="text-embedding-3-small"
export AI_GATEWAY_EMBEDDING_DIMENSIONS="1536"
export AI_GATEWAY_IMAGE_MODEL="dall-e-3"

Supported Model Types

| Model Type | Description | | ------------------- | ------------------------------- | | TEXT_SMALL | Fast, efficient text generation | | TEXT_LARGE | High-quality text generation | | TEXT_EMBEDDING | Vector embeddings | | OBJECT_SMALL | JSON generation (small model) | | OBJECT_LARGE | JSON generation (large model) | | IMAGE | Image generation | | IMAGE_DESCRIPTION | Image analysis |

Development

Build All

# TypeScript
bun run build:ts

# Python
bun run build:python

# Rust
bun run build:rust

Test All

# TypeScript
bun run test:ts

# Python
bun run test:python

# Rust
bun run test:rust

Lint

bun run lint

Architecture

plugin-vercel-ai-gateway/
├── typescript/          # TypeScript implementation
│   ├── index.ts        # Main plugin export
│   ├── types/          # Type definitions
│   ├── models/         # Model handlers
│   ├── providers/      # HTTP client
│   └── utils/          # Configuration utilities
├── python/             # Python implementation
│   ├── elizaos_plugin_gateway/
│   │   ├── __init__.py
│   │   ├── client.py   # HTTP client
│   │   ├── config.py   # Configuration
│   │   ├── plugin.py   # Plugin class
│   │   └── types.py    # Type definitions
│   └── tests/
└── rust/               # Rust implementation
    ├── src/
    │   ├── lib.rs      # Main export
    │   ├── client.rs   # HTTP client
    │   ├── config.rs   # Configuration
    │   ├── error.rs    # Error types
    │   └── types.rs    # Type definitions
    └── tests/

License

MIT

Contributing

  1. Fork the repository
  2. Create your feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

Please ensure all three language implementations maintain parity.