@senomas/proxy-provider

A [pi-coding-agent](https://github.com/earendil-works/pi-coding-agent) extension that registers a **deepseek** provider via a configurable AI proxy.

Packages

Package details

extension

Install @senomas/proxy-provider from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@senomas/proxy-provider
Package
@senomas/proxy-provider
Version
0.1.1
Published
Jun 14, 2026
Downloads
not available
Author
senomas
License
MIT
Types
extension
Size
12.2 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./src/index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@senomas/proxy-provider

A pi-coding-agent extension that registers a deepseek provider via a configurable AI proxy.

What it does

This package extends pi with a provider named "deepseek". On every session:

  1. Walks up from the current directory looking for .pi-project.json
  2. Reads the project and proxy fields from that file
  3. Fetches model definitions from ${proxy}/static/providers/deepseek.json
  4. Registers the provider with the proxy as baseUrl and the project name as the AI-Proxy-Project header

Prerequisites

  • Node.js 18+ (for global fetch)
  • pi-coding-agent installed (npm install -g @earendil-works/pi-coding-agent)

Installation

pi install npm:@senomas/proxy-provider

Configuration

Create a .pi-project.json file in your project root:

{
  "project": "my-project",
  "proxy": "https://deepseek-proxy-dev.senomas.com"
}
Field Type Description
project string Project name sent as the AI-Proxy-Project header
proxy string Base URL of the AI proxy server

Verification

After installation, list available models to confirm the provider is registered:

pi --list-models | grep deepseek

You should see the deepseek models exposed by your proxy.

How it works

The extension exports an async default function that:

  1. Uses fs.existsSync and fs.readFileSync (Node built-ins) to find and parse .pi-project.json
  2. Calls fetch() to retrieve provider metadata from the proxy
  3. Calls pi.registerProvider("deepseek", config) with the fetched models, proxy baseUrl, and AI-Proxy-Project header

License

MIT