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

@juvio15/pi-seek

v0.4.1

Published

pi-seek is an extension for Pi. It connects Pi to the DeepSeek V4 Flash and V4 Pro models. It uses the DeepSeek Responses API and the DeepSeek beta API.

Readme

pi-seek

pi-seek is an extension for Pi. It connects Pi to the DeepSeek V4 Flash and V4 Pro models. It uses the DeepSeek Responses API and the DeepSeek beta API.

What pi-seek adds to Pi

pi-seek adds one provider, six tools, and four commands to Pi.

Provider. Pi can use DeepSeek V4 Flash or V4 Pro as its model provider. The provider name is deepseek-responses. The model names are deepseek-v4-flash and deepseek-v4-pro; the model picker selects the agent model. The ds_* tools use the model from the DEEPSEEK_MODEL setting.

Tools.

| Tool | What it does | |---|---| | ds_chat | Sends a message to DeepSeek in a named thread. Keeps the history for later messages. | | ds_chat_reset | Clears a thread. Removes all history in that thread. | | ds_prefix_complete | Continues a text from a fixed prefix. Use it for code and structured text. | | ds_fim | Fills the middle of code. It uses the code before the gap and the code after the gap. | | ds_web_search | Runs a DeepSeek web search. Returns an answer with citations. | | ds_call_function | Forces DeepSeek to make one strict function call. Validates the arguments before it returns them. |

Commands.

| Command | What it does | |---|---| | /ds | Starts a chat that does not keep history. | | /ds-cache | Shows the cache hit and miss tokens of the last request. Shows the cost. | | /ds-balance | Shows the account balance and the usage today. | | /deepseek | Opens the settings menu. Controls the integration and the default reasoning effort. |

Status line. After each use, the status line shows the cache hit and miss, the cost of the last request, and the remaining balance.

How pi-seek integrates DeepSeek

Authentication. pi-seek reads the API key from two places. The first place is the environment variable DEEPSEEK_API_KEY. The second place is the models.json file. pi-seek sends the key in the Authorization header of each request.

Endpoints. pi-seek uses the Responses API for chat and for web search. It uses the beta API for prefix completion and for FIM.

Reasoning. DeepSeek has seven reasoning effort levels: none, minimal, low, medium, high, xhigh, and max. pi-seek sends the level in each request. The default level is high for chat and low for web search.

Structured output. ds_chat can return text, JSON object, or JSON schema output. Use the format parameter to select the output. For JSON schema output, add the json_schema parameter.

Threads. The DeepSeek Responses API is stateless. It does not keep history between requests. pi-seek keeps the history in a named thread. Each round sends the history again. The replay is bounded: at most 200 items or 600,000 characters. The latest user message is always kept. pi-seek restores the threads when a session starts.

Reliability. All five fetch tools retry transient failures. A transient failure is a 429 response, a 5xx response, a network failure, or a timeout. The tools retry at most four times with exponential backoff. If the caller aborts a request, the tool returns "Interrupted by the caller." It does not throw an error. If a ds_chat request fails because the context is too long, pi-seek trims the history and retries once.

Function calls. ds_call_function converts a JSON schema to the DeepSeek strict dialect. It validates the returned arguments against the schema before it returns them.

Telemetry. pi-seek records the usage of each request. It records the input tokens, the output tokens, the reasoning tokens, the cache tokens, and the cost. It estimates the cost from the published prices. It keeps the last 100 records in the session.

Balance. The /ds-balance command fetches the account balance from DeepSeek. The balance is cached for 60 seconds. If the fetch fails, pi-seek uses the cached value.

Requirements

  • Pi 0.83 or newer.
  • Node 24 or newer.

Installation

From npm (preferred). The extension is published on npm.

pi install npm:@juvio15/pi-seek

To update the extension:

pi update npm:@juvio15/pi-seek

To remove the extension:

pi remove npm:@juvio15/pi-seek

From GitHub. The source code is on GitHub.

pi install git:github.com/bjoernaagaard/pi-seek

You can pin a release. Add @v0.3.0 to the command.

From a local copy.

pi install /path/to/pi-seek

Try without installing. Add the -e option. The extension loads for the current run only.

pi -e npm:@juvio15/pi-seek

Set the API key. Set the environment variable DEEPSEEK_API_KEY. Or add the apiKey for the deepseek-responses provider to the models.json file.

Configuration

| Setting | What it does | |---|---| | DEEPSEEK_API_KEY | The DeepSeek API key. | | DEEPSEEK_REQUEST_TIMEOUT_S | The absolute request timeout in seconds. Without it, the timeout scales with the token budget. | | DEEPSEEK_MODEL | The model the ds_* tools use: deepseek-v4-flash (default) or deepseek-v4-pro. | | reasoning_effort | The reasoning effort of a request. The default is high. |

Notes

  • Each tool call is a paid DeepSeek API request. Keep max_output_tokens small for tests.
  • The FIM tool has a maximum of 4096 output tokens.
  • ds_call_function uses non-thinking mode. DeepSeek rejects a forced tool choice in thinking mode.
  • Do not put the API key in source code or in log files.