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

@tashiscool/providers

v0.1.0

Published

LLM provider registry with model metadata and capabilities

Readme

@llm-utils/providers

LLM provider registry with comprehensive model metadata and capabilities. Easily discover and manage models across 14+ providers.

Installation

pnpm add @llm-utils/providers
# or
npm install @llm-utils/providers

Features

  • 14+ Provider Support - OpenAI, Anthropic, Google, Mistral, Groq, DeepSeek, xAI, and more
  • Model Metadata - Context windows, capabilities, pricing, and release dates
  • Capability Filtering - Find models with vision, tool calling, streaming, etc.
  • Credential Management - Auto-detection from environment variables
  • Type-Safe - Full TypeScript support with comprehensive types

Usage

Quick Start

import {
  getModelById,
  getModelsWithCapability,
  ProviderRegistry
} from '@llm-utils/providers';

// Get a specific model
const gpt4o = getModelById('gpt-4o');
console.log(gpt4o?.contextWindow); // 128000
console.log(gpt4o?.capabilities.vision); // true

// Find all models with vision capability
const visionModels = getModelsWithCapability('vision');
console.log(visionModels.length); // Multiple models

// Create a registry from environment
const registry = new ProviderRegistry();
registry.registerFromEnv();

// Find models across registered providers
const streamingModels = registry.findModelsWithCapability('streaming');

Provider Registry

import { ProviderRegistry, createProviderInstance } from '@llm-utils/providers';

// Create a registry
const registry = new ProviderRegistry();

// Register with explicit credentials
registry.register('openai', { apiKey: 'sk-...' });
registry.register('anthropic', { apiKey: 'sk-ant-...' });

// Or register all from environment
registry.registerFromEnv();

// Get a provider instance
const openai = registry.get('openai');
if (openai?.isConfigured()) {
  const models = openai.listModels();
  const visionModels = openai.listModelsWithCapability('vision');
}

Model Discovery

import {
  allModels,
  getModelsByProvider,
  getModelsWithCapability
} from '@llm-utils/providers';

// Get all models
console.log(allModels.length);

// Get models by provider
const anthropicModels = getModelsByProvider('anthropic');
const openaiModels = getModelsByProvider('openai');

// Filter by capability
const toolCallingModels = getModelsWithCapability('toolCalling');
const jsonModeModels = getModelsWithCapability('jsonMode');
const embeddingModels = getModelsWithCapability('embeddings');

Provider Configuration

import { getProvider, getAllProviders, isProviderConfigured } from '@llm-utils/providers';

// Get provider config
const openai = getProvider('openai');
console.log(openai.baseUrl); // https://api.openai.com/v1
console.log(openai.requiredEnvVars); // ['OPENAI_API_KEY']

// List all providers
const providers = getAllProviders();
providers.forEach(p => console.log(`${p.name}: ${p.description}`));

// Check if configured from environment
if (isProviderConfigured('anthropic')) {
  console.log('Anthropic is ready to use');
}

Supported Providers

| Provider | ID | Models | |----------|-----|--------| | OpenAI | openai | GPT-4o, GPT-4, o1, DALL-E, Embeddings | | Anthropic | anthropic | Claude 3.5 Sonnet, Claude 3 Opus, Haiku | | Google | google | Gemini 2.0, Gemini 1.5 Pro/Flash | | Mistral | mistral | Mistral Large, Small, Codestral | | Groq | groq | Llama 3.3, Mixtral, Gemma | | DeepSeek | deepseek | DeepSeek V3, R1 | | xAI | xai | Grok 2, Grok Vision | | Azure OpenAI | azure-openai | OpenAI models on Azure | | AWS Bedrock | aws-bedrock | Claude, Mistral on AWS | | Ollama | ollama | Local models | | Together AI | together-ai | Open models | | Replicate | replicate | Various models | | Hugging Face | huggingface | Inference API | | Cohere | cohere | Command, Embed |

Model Capabilities

Each model includes capability flags:

interface ModelCapabilities {
  chat: boolean;           // Text generation
  vision: boolean;         // Image input
  toolCalling: boolean;    // Function calling
  jsonMode: boolean;       // JSON output mode
  structuredOutput: boolean; // Schema-based output
  streaming: boolean;      // Stream responses
  embeddings: boolean;     // Vector embeddings
  imageGeneration: boolean; // Image creation
  audio: boolean;          // Audio I/O
}

API Reference

Types

  • ProviderId - Provider identifier union type
  • ModelMetadata - Model information including capabilities and pricing
  • ProviderConfig - Provider configuration including base URL and env vars
  • ProviderCredentials - API keys and connection options
  • ProviderInstance - Configured provider with methods

Functions

  • getModelById(id) - Get model by ID
  • getModelsByProvider(provider) - Get all models for a provider
  • getModelsWithCapability(cap) - Filter models by capability
  • getProvider(id) - Get provider configuration
  • getAllProviders() - List all provider configs
  • isProviderConfigured(id) - Check env var configuration
  • createProviderInstance(id, creds?) - Create provider instance

Classes

  • ProviderRegistry - Manage multiple provider instances

License

MIT