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

@tejasa97/pi-orcarouter-provider

v0.1.1

Published

Pi provider package for OrcaRouter (GLM 5.3 Flash Free, DeepSeek, Kimi, and more) — OpenAI-compatible gateway with dynamic model discovery.

Downloads

379

Readme

@tejasa97/pi-orcarouter-provider

Pi provider package for OrcaRouter — an OpenAI-compatible API gateway with 200+ models, including the free GLM 5.3 Flash (Free) tier (z-ai/glm-5.3-flash-free).

Auth is an API key stored by /login in ~/.pi/agent/auth.json, with ORCAROUTER_API_KEY as a fallback. Model discovery uses GET /v1/models when a key is available, falling back to a small static catalog.

Install

pi install git:github.com/tejasa97/pi-orcarouter-provider

For local development:

pi install ./pi-orcarouter-provider

Usage

  1. Create an API key in the OrcaRouter console
  2. In Pi: /login → OrcaRouter → paste your API key
  3. /model → pick a model such as orcarouter/z-ai/glm-5.3-flash-free

Or skip /login by exporting the key in the shell that starts Pi:

export ORCAROUTER_API_KEY="sk-orca-..."
pi

Optional base URL override:

export ORCAROUTER_BASE_URL="https://api.orcarouter.ai/v1"

Models

Models are fetched dynamically from GET https://api.orcarouter.ai/v1/models when a key is configured. Chat-completions models are selected from the catalog:

  • entries listing "openai" in supported_endpoint_types, plus
  • free-tier stubs with a null endpoint list (e.g. z-ai/glm-5.3-flash-free, deepseek/deepseek-v4-flash-free), excluding obvious non-chat offerings (image/video/tts/embeddings by id).

The static fallback includes:

| Model | Reasoning | Input | Context | Max output | | ----- | --------- | ----- | ------- | ---------- | | z-ai/glm-5.3-flash-free | always-on | text + image | 110K* | 128K | | z-ai/glm-5.3-flash | always-on | text + image | 1M | 128K | | z-ai/glm-5.3 | always-on | text | 1M | 128K | | deepseek/deepseek-v4-flash-free | yes | text | 164K | 32K | | tencent/hy3-free | yes | text | 128K | 32K |

Free-tier limits

z-ai/glm-5.3-flash-free is $0 per request, but OrcaRouter gates it:

  • Single-request prompt cap ~122K tokens. The catalog advertises a 1M context, but prompts above roughly 122K tokens are rejected with free_rate_limited ("This prompt is longer than the free tier allows for a single request"). The provider registers the model with a 110K context window so Pi keeps sessions under the cap (Pi's system prompt and tool definitions consume part of it).
  • Rolling usage gate. After sustained heavy usage the same free_rate_limited error appears even for smaller prompts. It clears on its own after a quiet period.
  • Transient DNS failures. api.orcarouter.ai (EdgeOne CDN) intermittently fails to resolve, surfacing in Pi as "Connection error." Retrying after a minute usually works.

GLM-5 notes

Verified against the live endpoint:

  • Thinking is always on; reasoning_effort accepts low / medium / high / max. Pi's off maps to low, max maps to max.
  • The developer role is rejected upstream, so the provider uses system.
  • Token limits are sent as max_completion_tokens.
  • Costs come from the catalog's per-million price fields; the free tiers are $0 (flat per-request fee).

Tests

npm test