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-merius-provider

v1.0.4

Published

Merius provider extension for pi - Open models on Merius's own GPUs via an OpenAI-compatible API

Readme

🪐 pi-merius-provider

Open models on Merius's own GPUs for pi

One OpenAI-compatible API to open models on Merius's own GPUs — DeepSeek, GLM, Kimi, MiniMax, and more.

npm pi extension license


Features

  • OpenAI-compatible API — Uses Merius's /v1/chat/completions endpoint
  • Rich auto-synced catalogue — The Merius /v1/models endpoint returns per-model pricing, context windows, max output, modalities, and supported features; models.json is generated directly from it
  • Public model list/v1/models is unauthenticated, so pi lists Merius models (and the background model sync runs) even before you set a key
  • Reasoning models — Thinking models are detected from the API's supported_features and configured for reasoning_effort control
  • Vision models — Image input is auto-detected from input_modalities
  • Tool use — Function calling for models that advertise tools support
  • Streaming — Real-time token streaming
  • Prompt caching — Cached input is billed at a cheaper rate when the API reports an input_cache_read price

Available Models

| Model | Context | Vision | Reasoning | Input $/M | Output $/M | |-------|---------|--------|-----------|-----------|------------| | DeepSeek V4 Flash | 1.0M | ❌ | ✅ | $0.09 | $0.18 | | GLM-5.2 | 1.0M | ❌ | ✅ | $0.60 | $2.20 | | Kimi K3 | 1.0M | ✅ | ✅ | $2.50 | $13.00 | | MiniMax M3 | 524K | ❌ | ✅ | $0.30 | $1.20 |

The table above is regenerated by node scripts/update-models.js from the live Merius API. Costs are per million tokens (the API reports per-token prices). Prices subject to change — check docs.merius.ai/docs/pricing for current pricing.

Installation

Option 1: Using pi install (Recommended)

Install from npm (published as pi-merius-provider) or directly from GitHub:

# From npm
pi install npm:pi-merius-provider

# Or directly from GitHub
pi install https://github.com/monotykamary/pi-merius-provider

Then set your API key and run pi:

# Recommended: add to auth.json
# See Authentication section below

# Or set as environment variable
export MERIUS_API_KEY=your-api-key-here

pi

Get your API key from merius.ai.

Option 2: Manual Clone

  1. Clone this repository:

    git clone https://github.com/monotykamary/pi-merius-provider.git
    cd pi-merius-provider
  2. Set your Merius API key:

    # Recommended: add to auth.json
    # See Authentication section below
    
    # Or set as environment variable
    export MERIUS_API_KEY=your-api-key-here
  3. Run pi with the extension:

    pi -e /path/to/pi-merius-provider

Authentication

The Merius API key can be configured in multiple ways (resolved in this order):

  1. auth.json (recommended) — Add to ~/.pi/agent/auth.json:
    { "merius": { "type": "api_key", "key": "your-api-key" } }
    The key field supports literal values, env var names, and shell commands (prefix with !). See pi's auth file docs for details.
  2. Runtime override — Use the --api-key CLI flag
  3. Environment variable — Set MERIUS_API_KEY

Get your API key from merius.ai.

Note: A key is only required to actually call a model. The model catalogue (/v1/models) is public, so pi displays available Merius models and keeps them synced even before a key is configured.

Environment Variables

| Variable | Required | Description | |----------|----------|-------------| | MERIUS_API_KEY | No | Your Merius API key (fallback if not in auth.json; only needed to call a model) |

Configuration

Add to your pi configuration for automatic loading:

{
  "extensions": [
    "/path/to/pi-merius-provider"
  ]
}

Usage

Once loaded, select a model with:

/model merius minimax/minimax-m3

Or use /models to browse all available Merius models.

Reasoning Effort

For reasoning models, control thinking depth:

/reasoning high

Values: none, low, medium, high, max

API Compatibility

Merius provides an OpenAI-compatible API. Key notes:

| Aspect | Behavior | |--------|----------| | Endpoint | https://api.merius.ai/v1/chat/completions | | Max tokens field | Both max_tokens and max_completion_tokens accepted | | Thinking format | openai (reasoning_content in response, reasoning_effort in request) | | Developer role | Not assumed (developer messages are converted to system) | | Reasoning effort | Accepted by reasoning models | | /v1/models | Public (no auth) — returns pricing, context, modalities, and features | | Prompt caching | Cached input billed at a cheaper input_cache_read rate when the API exposes one |

Reasoning compat: The Merius /v1/models endpoint reports which models support reasoning, but not the wire format each model expects. Reasoning models are given the standard OpenAI-compatible defaults (thinkingFormat: "openai", supportsReasoningEffort: true, supportsDeveloperRole: false). If a model on Merius needs a different format (for example DeepSeek's native thinking field), override it in patch.json — see AGENTS.md.

API Documentation

  • Merius Docs: https://docs.merius.ai
  • OpenAI-compatible endpoint: https://api.merius.ai/v1
  • Models endpoint (public): https://api.merius.ai/v1/models
  • Pricing: https://docs.merius.ai/docs/pricing

Updating Models

Run the update script to fetch the latest models from Merius's API:

node scripts/update-models.js

The /v1/models endpoint is public, so no API key is required. This will:

  1. Fetch models from https://api.merius.ai/v1/models
  2. Derive pricing, context windows, max output, vision, and reasoning support from the API metadata
  3. Apply overrides from patch.json
  4. Update models.json and the README model table
  5. Move delisted models into deprecated-models.json (14-day grace period)

License

MIT