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

llmwise

v0.1.2

Published

Lightweight TypeScript SDK for the LLMWise multi-model API (chat, compare, blend, judge, failover).

Readme

LLMWise TypeScript SDK

Lightweight TypeScript client for the LLMWise multi-model API:

  • Chat (single model + Auto routing)
  • Failover routing (primary + fallback chain)
  • Compare (run 2+ models in parallel)
  • Blend (synthesize answers from multiple models, supports MoA / Self-MoA)
  • Judge (model-vs-model evaluation)
  • Full API coverage for conversations, history, credits, usage, keys, memory, optimization, and settings.

No heavy dependencies. Works in Node 18+ and modern browsers.

Install

npm install llmwise

Quickstart (Chat)

import { LLMWise } from "llmwise";

const client = new LLMWise("mm_sk_...");

const resp = await client.chat({
  model: "auto",
  messages: [{ role: "user", content: "Write a haiku about failover." }],
});

console.log(resp.content);

Streaming (Chat)

import { LLMWise } from "llmwise";

const client = new LLMWise("mm_sk_...");

for await (const ev of client.chatStream({
  model: "claude-sonnet-4.5",
  messages: [{ role: "user", content: "Explain recursion to a 10-year-old." }],
})) {
  if (ev.event === "done") {
    console.log("\\nDONE", ev.credits_charged, ev.credits_remaining);
    break;
  }
  if (ev.delta) process.stdout.write(ev.delta);
}

Failover (Chat + Routing)

import { LLMWise } from "llmwise";

const client = new LLMWise("mm_sk_...");

for await (const ev of client.chatStream({
  model: "claude-sonnet-4.5",
  routing: { fallback: ["gpt-5.2", "gemini-3-flash"], strategy: "rate-limit" },
  messages: [{ role: "user", content: "Summarize this in 3 bullets: ..." }],
})) {
  if (ev.event === "route" || ev.event === "trace") continue;
  if (ev.event === "done") break;
  if (ev.delta) process.stdout.write(ev.delta);
}

Additional API Helpers

  • conversations(), getConversation(), createConversation(), updateConversation(), deleteConversation()
  • history(), getHistoryDetail()
  • creditsWallet(), creditsTransactions(), creditsPacks(), creditsPurchase(), creditsConfirmCheckout(), creditsAutoTopup(), creditsBalance()
  • usageSummary(), usageRecent()
  • keysInfo(), keysGenerate(), revokeApiKey()
  • memory(), memorySearch(), memoryDelete(), memoryClear()
  • optimization* helpers, including policy/report/evaluate/replay/test suites/regression schedules
  • settings* helpers, including provider keys, privacy, and copilot state/ask endpoints

Additional API Helper Examples

Dashboard/API Health Check (Read-only)

import { LLMWise } from "llmwise";

const client = new LLMWise("mm_sk_...");

const models = await client.models();
const balance = await client.creditsBalance();
const usage = await client.usageSummary({ days: 7 });
const conversations = await client.conversations({ limit: 5 });

console.log({ models: models.length, balance, usage, conversations_count: (conversations as any)?.total || 0 });

Conversation Lifecycle

import { LLMWise } from "llmwise";

const client = new LLMWise("mm_sk_...");

const { id } = await client.createConversation();
await client.updateConversation(id, { title: "API smoke room" });
const list = await client.conversations({ limit: 10 });
await client.deleteConversation(id);

console.log("recent_conversations:", (list as any)?.total ?? 0);

Credits & Cost

import { LLMWise } from "llmwise";

const client = new LLMWise("mm_sk_...");

const wallet = await client.creditsWallet();
const usageRecent = await client.usageRecent({ days: 7, limit: 5 });
const packs = await client.creditsPacks();

console.log({ wallet, usageRecent, packs_count: (packs as any[])?.length });

Settings and Optimization

import { LLMWise } from "llmwise";

const client = new LLMWise("mm_sk_...");

const policy = await client.optimizationPolicy();
const report = await client.optimizationReport({ days: 1, goal: "balanced" });

console.log({ policy, report });

Smoke Script

LLMWISE_API_KEY=mm_sk_... npm run smoke

Configure

  • Default base URL: https://llmwise.ai/api/v1
  • Override with: new LLMWise({ apiKey, baseUrl })