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

@vivettoai/sdk

v0.3.0

Published

Official TypeScript/JavaScript SDK for the Vivetto AI gateway (OpenAI-compatible drop-in)

Readme

@vivettoai/sdk

Official TypeScript/JavaScript client for the Vivetto AI gateway.

OpenAI-compatible: Vivetto extends the official openai client (peer dependency). After swapping the constructor, existing chat, images, embeddings, moderations, audio, and OpenAI responses call sites keep working. Chat/completions go through the Vivetto gateway (with automatic provider failover). Other OpenAI APIs use your OPENAI_API_KEY fallback when the gateway does not proxy them.

Important: openai must be installed in your app (>=4). The SDK declares it as a peerDependency so TypeScript resolves a single OpenAI type (avoids private _options assignability errors).

Install

npm install @vivettoai/sdk
# or: pnpm add @vivettoai/sdk / yarn add @vivettoai/sdk

Requires Node 18+ and openai >= 4 (installed automatically).

Quick start

VIVETTO_API_KEY=viv_...
VIVETTO_GATEWAY_BASE_URL=https://vivetto-gateway-ulp3nlh52a-uc.a.run.app
OPENAI_API_KEY=sk-...   # failover + images/embeddings/etc.
import { Vivetto } from "@vivettoai/sdk";

const client = new Vivetto({
  apiKey: process.env.VIVETTO_API_KEY!,
  baseUrl: process.env.VIVETTO_GATEWAY_BASE_URL,
  fallback: {
    openaiApiKey: process.env.OPENAI_API_KEY,
  },
});

const completion = await client.chat.completions.create({
  model: "gpt-4o-mini",
  messages: [{ role: "user", content: "Hello from Vivetto" }],
});
console.log(completion.choices[0]?.message?.content);

Mint a key in the Vivetto dashboard (Settings → SDK & CLI), or run:

npx @vivettoai/wizard wizard --skip-agent

Deploying? Add VIVETTO_API_KEY and VIVETTO_GATEWAY_BASE_URL to your hosting platform's environment (Vercel, Cloud Run, etc.). The wizard only writes them to your local .env. If they are missing in production, requests bypass the gateway and go straight to your provider keys (see below), so nothing breaks, but you lose gateway routing and observability.

Provider failover

Requests never hard-fail just because the gateway is unavailable, as long as at least one provider key is configured (OPENAI_API_KEY, ANTHROPIC_API_KEY, or GEMINI_API_KEY, or the equivalent fallback options). The SDK sends the request to the original provider when:

  • VIVETTO_API_KEY is not set (the gateway is skipped entirely),
  • the gateway URL is wrong or unreachable (network errors, HTTP 404/405 from something that is not a Vivetto gateway),
  • the gateway is down or timing out (any 5xx, or 408).

Claude models fall back to Anthropic and Gemini models to Google; everything else falls back to OpenAI. Fallback responses include vivetto_fallback: true. Policy blocks from the gateway (HTTP 403) are never bypassed.

Publishing (maintainers)

From the monorepo root, use pnpm only so workspace:^ is rewritten:

pnpm --filter @vivettoai/sdk check-pack
pnpm --filter @vivettoai/sdk publish --access public --no-git-checks

See ../wizard/PUBLISH.md.