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

vantedge-ai-sdk

v0.1.1

Published

VantEdge AI SDK provider for AI SDK

Readme

vantedge-ai-sdk

VantEdge AI SDK provider for AI SDK - A custom provider that implements OpenAI-compatible endpoints for AI SDK.

Installation

npm install vantedge-ai-sdk

Usage

Basic Usage

import { vantedgeai } from 'vantedge-ai-sdk';
import { generateText } from 'ai';

const { text } = await generateText({
  model: vantedgeai('your-model-id'),
  prompt: 'Hello, how are you?',
});

Chat Model

import { vantedgeai } from 'vantedge-ai-sdk';
import { streamText } from 'ai';

const { textStream } = await streamText({
  model: vantedgeai.chatModel('your-chat-model-id'),
  messages: [{ role: 'user', content: 'Hello, how are you?' }],
});

Completion Model

import { vantedgeai } from 'vantedge-ai-sdk';
import { generateText } from 'ai';

const { text } = await generateText({
  model: vantedgeai.completionModel('your-completion-model-id'),
  prompt: 'Complete this sentence: The weather today is',
});

Embedding Model

import { vantedgeai } from 'vantedge-ai-sdk';
import { embed } from 'ai';

const { embedding } = await embed({
  model: vantedgeai.textEmbeddingModel('your-embedding-model-id'),
  value: 'This is a sample text to embed.',
});

Image Model

import { vantedgeai } from 'vantedge-ai-sdk';
import { generateImage } from 'ai';

const { image } = await generateImage({
  model: vantedgeai.imageModel('your-image-model-id'),
  prompt: 'A beautiful sunset over the ocean',
});

Configuration

Custom Provider Instance

import { createVantEdgeAI } from 'vantedge-ai-sdk';

const customProvider = createVantEdgeAI({
  apiKey: 'your-api-key',
  baseURL: 'https://your-api-endpoint.com/v1',
  headers: {
    'Custom-Header': 'custom-value',
  },
  queryParams: {
    version: '2024-01-01',
  },
});

// Use the custom provider
const { text } = await generateText({
  model: customProvider('your-model-id'),
  prompt: 'Hello world',
});

Environment Variables

You can set the API key using environment variables:

export VANTEDGE_API_KEY="your-api-key"

API Reference

createVantEdgeAI(options)

Creates a custom VantEdge AI provider instance.

Options

  • apiKey (string, optional): Your VantEdge AI API key
  • baseURL (string, optional): Base URL for API calls (default: environment-specific)
  • headers (Record<string, string>, optional): Custom headers to include in requests
  • queryParams (Record<string, string>, optional): Custom query parameters
  • fetch (FetchFunction, optional): Custom fetch implementation

vantedgeai

Default provider instance with default configuration.

Model IDs

The package supports various model types:

  • Chat Models: Use with vantedgeai() or vantedgeai.chatModel()
  • Completion Models: Use with vantedgeai.completionModel()
  • Embedding Models: Use with vantedgeai.textEmbeddingModel()
  • Image Models: Use with vantedgeai.imageModel()

Features

  • ✅ OpenAI-compatible API endpoints
  • ✅ Support for chat, completion, embedding, and image models
  • ✅ Customizable headers and query parameters
  • ✅ Environment variable support for API keys
  • ✅ TypeScript support with full type definitions
  • ✅ Custom fetch implementation support
  • ✅ Thread ID management for conversation context

Requirements

  • Node.js 18+
  • AI SDK 1.0+

License

Apache 2.0

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.