@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.
Package details
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.2- Published
- Jul 3, 2026
- Downloads
- 274/mo · 22/wk
- Author
- senomas
- License
- MIT
- Types
- extension
- Size
- 32.4 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 "deepseek" provider (always registered). On every session:
- Walks up from the current directory looking for
.pi-project.json - Reads the
project,proxy, and optionalprovidersfields from that file - Fetches model definitions from
${proxy}/static/providers/deepseek.jsonand registers the default"deepseek"provider - If a
providersmap is present, fetches and registers each additional provider - All providers get the proxy as
baseUrland the project name as theAI-Proxy-Projectheader
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://proxy.example.com"
}
| Field | Type | Description |
|---|---|---|
project |
string |
Project name sent as the AI-Proxy-Project header |
proxy |
string |
Base URL of the AI proxy server |
providers |
object (optional) |
Map of provider names to config filenames under {proxy}/static/providers/ |
Multiple providers
You can register additional providers by adding a providers map. Each entry registers a provider with the same baseUrl and AI-Proxy-Project header as the default "deepseek".
{
"project": "my-project",
"proxy": "https://proxy.example.com",
"providers": {
"deepseek-work": "deepseek.json",
"deepseek-chat": "deepseek-chat.json"
}
}
The default
"deepseek"fromdeepseek.jsonis always registered. If you include a key named"deepseek"inproviders, it overrides the default.
Server-side dependency
This extension requires a running AI proxy server that exposes provider configuration files under /static/providers/.
Refer to the ai-team-proxy project for the reference proxy implementation and deployment instructions.
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:
- Uses
fs.existsSyncandfs.readFileSync(Node built-ins) to find and parse.pi-project.json - Calls
fetch()to retrieve the default"deepseek"provider metadata from the proxy - If a
providersmap is present, fetches and registers each additional provider in the same way - Calls
pi.registerProvider(name, config)for each provider with the fetched models, proxybaseUrl, andAI-Proxy-Projectheader
License
MIT