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

@aliou/pi-synthetic

v0.17.1

Published

![banner](https://assets.aliou.me/pi-extensions/banners/pi-synthetic.png)

Readme

banner

Pi Synthetic Extension

A Pi extension that adds Synthetic as a model provider, giving you access to open-source models through Synthetic's OpenAI-compatible API.

Installation

Get API Key

Sign up at synthetic.new to get an API key (referral link).

Configure Credentials

The extension uses Pi's credential storage. Add your API key to ~/.pi/agent/auth.json (recommended):

{
  "synthetic": { "type": "api_key", "key": "your-api-key-here" }
}

Or set environment variable:

export SYNTHETIC_API_KEY="your-api-key-here"

Credentials are resolved in this order:

  1. CLI --api-key flag
  2. auth.json entry for synthetic
  3. Environment variable SYNTHETIC_API_KEY

Install Extension

# From npm
pi install npm:@aliou/pi-synthetic

# From git
pi install git:github.com/aliou/pi-synthetic

# Local development
pi -e ./src/index.ts

Usage

Once installed, select synthetic as your provider and choose from available models:

/model synthetic hf:moonshotai/Kimi-K2.5

Model Hosting

All models are accessed through Synthetic's API. Some models are hosted by Synthetic directly (provider: "synthetic" in the model config); others are proxied by Synthetic to upstream backends such as Fireworks or Together.

By default, new installs show only Synthetic-hosted models. You can enable proxied models in /synthetic:settings under Models > Proxied Models. Existing configurations keep proxied models enabled to preserve prior behavior.

The provider field in src/extensions/provider/models.ts is for maintenance only and is stripped before registering models with Pi, so users always select the synthetic provider.

Web Search Tool

The extension registers synthetic_web_search — a zero-data-retention web search tool. The tool is always visible; it fails with a clear message if credentials are missing or the account lacks a subscription.

Reasoning Levels

For Synthetic models that support reasoning, Synthetic currently accepts only low, medium, and high reasoning effort values.

This extension clamps Pi reasoning levels to Synthetic's supported set:

  • minimal -> low
  • low -> low
  • medium -> medium
  • high -> high
  • xhigh -> high

Quotas Command

Check your API usage:

/synthetic:quotas

Usage Status

When a Synthetic model is active, the footer status bar shows live quota usage (e.g. week:82% (↺in 3d) 5h:95%). Colors follow the same severity assessment as quota warnings: green by default, yellow/red only when projected usage is at risk. The status auto-refreshes every 60 seconds and after each turn.

Quota Warnings

The extension automatically notifies you when you approach or exceed your Synthetic API quotas. Notifications fire on severity transitions only (no repeated alerts for the same level) and use correct terminology (regen/tick/resets) with precise time formatting.

  • Escalation always notifies
  • high and critical levels have no cooldown
  • warning level has a 60-minute cooldown

Disabling Features

Each feature (provider, web search, quotas command, sub bar integration, usage status, quota warnings) is a separate Pi extension. You can disable individual features using pi config:

pi config extensions.disabled add @aliou/pi-synthetic/quota-warnings

This prevents the quota-warnings extension from loading while keeping the rest of pi-synthetic active. Replace quota-warnings with web-search, command-quotas, sub-bar-integration, usage-status, or provider to disable other features.

The Proxied Models setting is not a loadable extension feature. It is a regular setting controlled through /synthetic:settings.

Adding or Updating Models

Models are hardcoded in src/extensions/provider/models.ts. To add or update models:

  1. Edit src/extensions/provider/models.ts
  2. Add the model configuration following the SyntheticModelConfig interface
  3. Set provider to the upstream backend Synthetic uses for that model, such as synthetic, fireworks, or together
  4. Run pnpm run typecheck to verify

Development

Setup

git clone https://github.com/aliou/pi-synthetic.git
cd pi-synthetic

# Install dependencies (sets up pre-commit hooks)
pnpm install && pnpm prepare

Pre-commit hooks run on every commit:

  • TypeScript type checking
  • Biome linting
  • Biome formatting with auto-fix

Commands

# Type check
pnpm run typecheck

# Lint
pnpm run lint

# Format
pnpm run format

# Test
pnpm run test

Test Locally

pi -e ./src/index.ts

Release

This repository uses Changesets for versioning.

Note: Automatic NPM publishing is currently disabled. To publish manually:

  1. Create a changeset: pnpm changeset
  2. Version packages: pnpm version
  3. Publish (when ready): Uncomment the publish job in .github/workflows/publish.yml

Requirements

  • Pi coding agent v0.72.0+
  • Synthetic API key (configured in ~/.pi/agent/auth.json or via SYNTHETIC_API_KEY)

Links