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

supercompat

v4.2.3

Published

![Supercompat — Switch AI models without compromises.](https://raw.githubusercontent.com/supercorp-ai/supercompat/main/packages/supercompat/supercompat.png)

Downloads

809

Readme

Supercompat — Switch AI models without compromises.

Supercompat is AI compatibility layer without compromises. Supercompat library that lets you call any LLM provider through the OpenAI SDK (or the Anthropic SDK). Swap one adapter and the same client.responses.create() call reaches Anthropic, Google, Groq, Mistral, Together, OpenRouter, Perplexity, Ollama, or Azure — with the original SDK types intact.

It runs in-process. No proxy server, no request forwarding, no extra latency. Supercompat installs a custom fetch on the SDK instance and routes calls locally.

Full docs: supercompat.com/docs.

Install

npm install supercompat openai

Quick example

import {
  supercompat,
  anthropicClientAdapter,
  completionsRunAdapter,
  memoryStorageAdapter,
} from 'supercompat/openai'
import Anthropic from '@anthropic-ai/sdk'

const client = supercompat({
  clientAdapter: anthropicClientAdapter({ anthropic: new Anthropic() }),
  storageAdapter: memoryStorageAdapter(),
  runAdapter: completionsRunAdapter(),
})

const response = await client.responses.create({
  model: 'claude-sonnet-4-6',
  input: 'Say hello.',
})

console.log(response.output_text)

client is a real OpenAI instance with the real TypeScript types. Every call made on it — responses, chat.completions, beta.threads — is intercepted by Supercompat and translated into a request against the Anthropic SDK. Switching providers is a change to clientAdapter; everything else stays the same.

Persistent state

memoryStorageAdapter is fine for one-shot scripts but loses everything on restart. For persisted conversations, threads, and runs, swap it for prismaStorageAdapter:

import { PrismaClient } from '@prisma/client'
import {
  supercompat,
  anthropicClientAdapter,
  completionsRunAdapter,
  prismaStorageAdapter,
} from 'supercompat/openai'
import Anthropic from '@anthropic-ai/sdk'

const prisma = new PrismaClient()

const client = supercompat({
  clientAdapter: anthropicClientAdapter({ anthropic: new Anthropic() }),
  storageAdapter: prismaStorageAdapter({ prisma }),
  runAdapter: completionsRunAdapter(),
})

// Continue a conversation across requests with previous_response_id:
const first = await client.responses.create({
  model: 'claude-sonnet-4-6',
  input: 'My name is Alice.',
})

const second = await client.responses.create({
  model: 'claude-sonnet-4-6',
  input: 'What did I just tell you?',
  previous_response_id: first.id,
})

Conversations, responses, assistants, threads, messages, and runs all land in Postgres. See Storage adapters for every option — including OpenAI-managed and Azure-managed state.

Where to go next

  • Installation — install the package, pick a provider SDK, and wire them together.
  • Comparison — how Supercompat compares to Vercel AI SDK, LiteLLM, LangChain, and others.
  • Output SDKs — return an OpenAI-shaped or Anthropic-shaped client. Works with every provider.
  • Adapters — the three adapter types (client, storage, run) and how they compose.
  • Providers — setup notes for OpenAI, Anthropic, Google, Azure, and every other backend.
  • Tools — function calling, web search, file search, code interpreter, and computer use.
  • Streaming — stream deltas through the OpenAI SDK regardless of which provider is behind it.

Links