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

v3.0.3

Published

DeepSeek provider extension for pi - V4 Pro, V4 Flash & Reasoner with 1M context and thinking mode

Readme

🐋 pi-deepseek-provider

DeepSeek V4 Pro, V4 Flash & Reasoner for pi

Native DeepSeek API with 1M context, thinking mode, and live model sync.

pi extension license


Features

  • DeepSeek V4 Pro — Flagship model with thinking mode, 1M context, and 384K max output
  • DeepSeek V4 Flash — Fast and affordable model with thinking mode, 1M context, and 384K max output
  • DeepSeek Reasoner (deprecated) — Legacy reasoning model (maps to V4 Flash thinking mode)
  • DeepSeek Chat (deprecated) — Legacy non-reasoning model (maps to V4 Flash non-thinking mode)
  • Reasoning Effort Controlhigh/max effort levels for thinking mode
  • Anthropic API Compatible — Also available at https://api.deepseek.com/anthropic

Installation

Option 1: Using pi install (Recommended)

Install directly from GitHub:

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

Then set your API key and run pi:

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

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

pi

Get your API key at platform.deepseek.com/api_keys.

Option 2: Manual Clone

  1. Clone this repository:

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

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

    pi -e /path/to/pi-deepseek-provider

Available Models

| Model | Context | Reasoning | Reasoning Effort | Input $/M | Output $/M | Cache Hit $/M | |-------|---------|-----------|------------------|-----------|------------|---------------| | Deepseek Flash | 131K | ❌ | ❌ | — | — | — | | DeepSeek V4 Pro | 1M | ✅ | ✅ | $0.43 | $0.87 | $0.00 |

Costs are per million tokens. Prices subject to change — check api-docs.deepseek.com for current pricing.

Note: The model names deepseek-chat and deepseek-reasoner will be deprecated on 2026/07/24. They correspond to the non-thinking mode and thinking mode of deepseek-v4-flash, respectively. Use deepseek-v4-flash and deepseek-v4-pro for new projects.

Usage

After loading the extension, use the /model command in pi to select your preferred model:

/model deepseek deepseek-v4-pro

Or start pi directly with a DeepSeek model:

pi --provider deepseek --model deepseek-v4-pro

Thinking Mode

DeepSeek V4 models support both thinking and non-thinking modes. Thinking mode is enabled by default. In pi, reasoning models use the deepseek thinking format which sends thinking: {type: "enabled/disabled"} plus reasoning_effort mapped from pi's thinking levels.

To control reasoning effort, use the --reasoning-effort flag:

pi --provider deepseek --model deepseek-v4-pro --reasoning-effort max

Effort levels: high (default for regular requests), max (default for agent/coding requests).

Authentication

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

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

Get your API key at platform.deepseek.com/api_keys.

Configuration

Add to your pi configuration for automatic loading:

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

Compat Settings

DeepSeek's API uses these provider-specific compatibility settings:

  • thinkingFormat: "deepseek" — Reasoning models (V4 Pro, V4 Flash). Sends thinking: {type: "enabled"/"disabled"} to toggle thinking mode. When enabled, reasoning_effort is mapped via thinkingLevelMap (high"high", max"max"). Minimal/low/medium are unsupported (null).
  • supportsReasoningEffort: true — V4 models. Supports reasoning_effort: "high" | "max".
  • requiresReasoningContentOnAssistantMessages: true — V4 models. Replayed assistant messages include empty reasoning_content when reasoning is enabled, required by DeepSeek's API.
  • supportsDeveloperRole, supportsStore, maxTokensField — Auto-detected from baseUrl (deepseek.com). Not explicitly set.

Patch Overrides

The patch.json file contains overrides that are applied on top of models.json data. This is useful for:

  • Correcting API-derived values (e.g., marking a model as reasoning-capable)
  • Adding compat settings that the API doesn't provide
  • Overriding pricing when official rates change

Updating Models

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

export DEEPSEEK_API_KEY=your-api-key
node scripts/update-models.js

This will:

  1. Fetch models from https://api.deepseek.com/models
  2. Preserve pricing and compat from existing models.json
  3. Apply overrides from patch.json
  4. Update models.json and the README model table

A GitHub Actions workflow runs this daily and creates a PR if models have changed.

License

MIT