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

v1.0.23

Published

CrofAI provider extension for pi - Access Kimi, GLM, Qwen, DeepSeek, MiniMax, and Gemma models through the CrofAI API

Readme

🔗 pi-crofai-provider

Open-weight models through CrofAI

A pi provider extension with reasoning, vision, and live usage status.

pi extension license


Features

  • OpenAI-compatible API - Uses CrofAI's /v1/chat/completions endpoint
  • Reasoning models - Support for thinking models with reasoning_effort parameter
  • Vision models - Image input support on Kimi K2.5, Kimi K2.6, GLM 5.1 (Precision), and Qwen 3.5 / 3.6
  • Tool use - Function calling support
  • Streaming - Real-time token streaming
  • Free tier - Some models available at no cost (GLM 4.7 Flash, Qwen3.5 9B)
  • Usage status bar — Displays your remaining credits and daily request count in the pi footer, updated live across sessions

Available Models

| Model | Context | Vision | Reasoning | Input $/M | Cache Read $/M | Output $/M | |-------|---------|--------|-----------|-----------|-----------------|------------| | DeepSeek V3.2 | 164K | ❌ | ✅ | $0.18 | $0.04 | $0.35 | | DeepSeek V4 Flash | 1.0M | ❌ | ✅ | $0.12 | $0.00 | $0.21 | | DeepSeek V4 Flash 0731 | 1.0M | ❌ | ✅ | $0.12 | $0.00 | $0.21 | | DeepSeek V4 Pro | 1.0M | ❌ | ✅ | $0.35 | $0.00 | $0.80 | | DeepSeek V4 Pro (Lightning) | 1.0M | ❌ | ✅ | $0.80 | $0.02 | $1.60 | | DeepSeek V4 Pro 0813 | 1.0M | ❌ | ✅ | $0.35 | $0.01 | $0.80 | | Gemma 4 31B IT | 262K | ❌ | ✅ | $0.10 | $0.02 | $0.30 | | GLM 4.7 | 203K | ❌ | ✅ | $0.25 | $0.05 | $1.10 | | GLM 4.7 Flash | 203K | ❌ | ✅ | $0.04 | $0.01 | $0.30 | | GLM 5 | 203K | ❌ | ✅ | $0.48 | $0.10 | $1.90 | | GLM 5.1 | 203K | ❌ | ✅ | $0.45 | $0.08 | $2.15 | | GLM 5.2 | 1.0M | ❌ | ✅ | $0.30 | $0.05 | $1.05 | | Greg (Roleplay) | 229K | ❌ | ❌ | $0.10 | $0.02 | $0.30 | | Greg 1 Mini | 229K | ❌ | ❌ | $0.07 | $0.01 | $0.15 | | Greg 2 Super | 229K | ❌ | ❌ | $1.50 | $0.25 | $5.00 | | Greg 2 Ultra | 229K | ❌ | ❌ | $3.00 | $0.50 | $10.00 | | Kimi K2.5 | 262K | ✅ | ✅ | $0.35 | $0.07 | $1.70 | | Kimi K2.5 (Lightning) | 131K | ✅ | ✅ | $1.00 | $0.20 | $3.00 | | Kimi K2.6 | 262K | ✅ | ✅ | $0.50 | $0.05 | $1.99 | | Kimi K2.7 Code | 262K | ❌ | ✅ | $0.55 | $0.05 | $2.25 | | Kimi K3 | 1.0M | ❌ | ✅ | $2.00 | $0.25 | $8.00 | | Kimi K3 (Eco) | 1.0M | ❌ | ✅ | $1.00 | $0.10 | $4.00 | | MiMo-V2.5-Pro | 1.0M | ❌ | ✅ | $0.40 | $0.00 | $0.80 | | MiniMax M2.5 | 205K | ❌ | ✅ | $0.11 | $0.02 | $0.95 | | Qwen3.5 397B A17B | 262K | ✅ | ✅ | $0.35 | $0.07 | $1.75 | | Qwen3.5 9B | 262K | ✅ | ✅ | $0.04 | $0.01 | $0.15 | | Qwen3.6 27B | 262K | ✅ | ✅ | $0.20 | $0.04 | $1.50 | | Qwen3.8 27B | 262K | ❌ | ✅ | $0.25 | $0.06 | $2.10 |

Installation

Option 1: Using pi install (Recommended)

Install directly from GitHub:

pi install https://github.com/monotykamary/pi-crofai-provider

Then set your API key and run pi:

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

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

pi

Get your API key from crof.ai.

Option 2: Manual Clone

  1. Clone this repository:

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

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

    pi -e /path/to/pi-crofai-provider

Authentication

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

  1. auth.json (recommended) — Add to ~/.pi/agent/auth.json:
    { "crofai": { "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 CROFAI_API_KEY

Get your API key from crof.ai.

Environment Variables

| Variable | Required | Description | |----------|----------|-------------| | CROFAI_API_KEY | No | Your CrofAI API key (fallback if not in auth.json) |

Configuration

Add to your pi configuration for automatic loading:

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

Usage

Once loaded, select a model with:

/model crofai kimi-k2.5

Or use /models to browse all available CrofAI models.

Reasoning Effort

For reasoning models, control thinking depth:

/reasoning high

Values: none, low, medium, high

Usage Status Bar

Once authenticated, the pi footer shows your CrofAI account status:

$12.35 | ⇄ 450
  • $X.XX — Remaining credit balance (hidden when $0)
  • ⇄ N — Daily requests remaining (hidden when not on a subscription plan)

The count is fetched from CrofAI's usage API on session start and after each user prompt. Between syncs, the request count is decremented locally per turn to avoid unnecessary API calls.

API Compatibility

The CrofAI proxy differs from native provider APIs in several ways. These are handled via patch.json:

| Aspect | Native APIs | CrofAI | |--------|------------|--------| | Max tokens field | max_completion_tokens | max_tokens | | Thinking format | Varies (openai, zai, qwen-chat-template) | openai (always reasoning_content) | | Developer role | Varies per model | ✅ Supported on all models | | Reasoning effort | Varies per model | Accepted by all reasoning models | | store parameter | Varies | ❌ Not supported |

Note: The CrofAI /v1/models endpoint does not reliably report reasoning capability. Many models that support thinking are missing the custom_reasoning or reasoning_effort flags. patch.json corrects these based on E2E testing.

API Documentation

  • CrofAI Docs: https://crof.ai/docs
  • OpenAI-compatible endpoint: https://crof.ai/v1
  • Models endpoint: https://crof.ai/v1/models
  • Usage endpoint: https://crof.ai/usage_api/

License

MIT