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-params

v0.1.0

Published

Per-provider-per-model parameter overrides (temperature, presence_penalty, repetition_penalty, frequency_penalty, top_k, top_p, max_token)

Readme

pi-params

A pi.dev extension that lets you set per-provider, per-model parameter overrides (temperature, top_p, top_k, frequency_penalty, etc.) by hooking into Pi's before_provider_request event.

How it works

  1. You define parameter overrides in .pi/params.toml
  2. pi-params tracks the current provider and model via the model_select event
  3. Before each provider API request, it injects your overrides into the request payload
  4. Overrides work with any provider — OpenAI, Anthropic, Google, OpenRouter, DeepSeek, etc.

Quick start

  1. Copy the example config:

    cp .pi/params.example.toml .pi/params.toml
  2. Edit .pi/params.toml to your preferences

  3. Load the extension:

    pi -e extensions/params.ts
  4. Or add to your project's .pi/settings.json for automatic loading:

    {
      "extensions": ["extensions/params.ts"]
    }

Config format

# Global defaults — applies to ALL providers and models
["*"."*"]
temperature = 0.7
top_p = 0.9
max_tokens = 4096

# Provider-level defaults — applies to all models from this provider
["openai"."*"]
frequency_penalty = 0.0
presence_penalty = 0.0

# Per-model — applies only to this specific model on this provider
["openai"."gpt-4o"]
temperature = 0.5
max_tokens = 8192

# Cross-provider model wildcard — applies to this model on ANY provider
["*"."claude-sonnet-4-20250514"]
temperature = 0.25

Merge behavior

Config entries are merged from least specific to most specific. Higher-specificity values override lower-specificity ones:

global (*/*)
  ↓
model wildcard (*/model)
  ↓
provider wildcard (provider/*)
  ↓
exact match (provider/model)

So if you set temperature = 0.7 in */* and temperature = 0.3 in anthropic/*, all Anthropic models get temperature = 0.3.

Slash commands

Use /params commands at runtime to adjust parameters without editing the config file. These session overrides take highest priority and are applied on top of your TOML config.

| Command | Description | |---------|-------------| | /params | Show current provider/model and all active overrides | | /params set <key> <value> | Set a parameter override for this session | | /params unset <key> | Remove a specific session override | | /params preset <name> | Apply a named preset | | /params reset | Clear all session overrides |

Presets

| Preset | temperature | top_p | Other | |--------|-------------|-------|-------| | creative | 1.0 | 0.95 | — | | precise | 0.1 | 0.1 | — | | balanced | 0.5 | 0.8 | — | | code | 0.2 | 0.5 | — | | brainstorm | 1.2 | 0.95 | frequency_penalty 0.5 | | long | — | — | max_tokens 16384 |

Priority chain (highest wins)

TOML global defaults (*/*)
  ↓
TOML model wildcard (*/model)
  ↓
TOML provider wildcard (provider/*)
  ↓
TOML exact match (provider/model)
  ↓
Session overrides (/params commands)  ← highest priority

Supported parameters

| Parameter | Type | Description | |-----------|------|-------------| | temperature | float (0.0–2.0) | Controls randomness. Lower = more deterministic. | | top_p | float (0.0–1.0) | Nucleus sampling threshold. | | top_k | integer | Top-k sampling (common with Anthropic, Google). | | frequency_penalty | float (0.0–2.0) | Penalizes repeated tokens by frequency. | | presence_penalty | float (0.0–2.0) | Penalizes tokens that have appeared. | | repetition_penalty | float (0.0–2.0) | General repetition penalty. | | max_tokens | integer | Maximum tokens in the response. | | stop | string or string[] | Stop sequences. |

Files

| File | Purpose | |------|---------| | extensions/params.ts | The extension itself | | .pi/params.toml | Your active config (create from example) | | .pi/params.example.toml | Example config with all providers and params |

Requirements

  • pi.dev CLI
  • npm dependency: smol-toml (installed via npm install in this project)

License

MIT