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

pi-sarvam

v0.1.0

Published

Sarvam AI provider for Pi: Indian-language chat models over the OpenAI-compatible Sarvam API, with a live models.dev catalog.

Readme

pi-sarvam

Sarvam AI models in Pi. Indian language chat models on top of the OpenAI compatible API at https://api.sarvam.ai/v2.

The extension registers the endpoint, the key, and the catalog. Requests flow through Pi's built in openai-completions implementation, so tools, images, thinking, streaming, usage, and cost accounting behave like a bundled provider.

Install

pi install npm:pi-sarvam

From git or a local checkout:

pi install git:github.com/madanlalit/pi-sarvam
pi install ./pi-sarvam
export SARVAM_API_KEY=sk_...
pi --model sarvam/glm5.3

pi list shows installed packages. pi remove pi-sarvam uninstalls.

Authenticate

Export SARVAM_API_KEY, or run /login and choose Sarvam AI to store the key in ~/.pi/agent/auth.json. Models appear once either source exists.

Models

  • sarvam-105b: 128K context, 128K output, thinking low/medium/high
  • sarvam-105b-conversations: 32K context, 32K output, no thinking
  • glm5.3: 1M context, 131K output, thinking low/high/max
  • glm5.3-flash: 1M context, 131K output, thinking low/high/max, images
  • gemma4: 262K context, 32K output, thinking none/low/high/max, images
  • deepseekv4.1-flash-1017: 1M context, 384K output, thinking none/low/high/max, images
  • deepseekv4.1-flash-1017-interactive: 1M context, 384K output, thinking none/low/high/max, images

Prefix each id with sarvam/. A bundled snapshot covers offline use and the first run.

Live catalog

refreshModels overlays the live sarvam entry from models.dev, so new models, limits, prices, and thinking options arrive without a release.

  • Cached in Pi's model store and restored before any network access, so the provider works offline
  • Rechecked at most once every 24 hours, with ETag revalidation
  • pi update --models skips extension providers, so open /model or restart Pi to force a check
  • A failed or missing catalog keeps the cached or bundled list

Environment

  • SARVAM_API_KEY: key used when no stored credential exists
  • SARVAM_BASE_URL: endpoint override, default https://api.sarvam.ai/v2
  • SARVAM_CATALOG_URL: catalog override, default https://models.dev/api.json
  • SARVAM_DISABLE_REASONING_EFFORT=1: stop sending reasoning_effort

Compatibility

Sarvam takes max_tokens rather than max_completion_tokens, and has no developer role or strict tool schemas.

compat: {
  supportsStore: false,
  supportsDeveloperRole: false,
  supportsStrictMode: false,
  supportsReasoningEffort: true,
  maxTokensField: "max_tokens",
}

Thinking arrives as reasoning_content, which Pi reads as a thinking block.

Development

npm test                    # 10 tests, no network, no dependencies
pi -e . --list-models sarvam

Tests cover catalog mapping, offline restore, cache freshness, ETag revalidation, empty catalogs, failures, and aborts.