pi-relace-provider
Register Relace (models.relace.ai) as an OpenAI-compatible model provider for pi
Package details
Install pi-relace-provider from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-relace-provider- Package
pi-relace-provider- Version
0.1.3- Published
- Aug 23, 2026
- Downloads
- 603/mo · 10/wk
- Author
- shivamnarkar47
- License
- Apache-2.0
- Types
- extension
- Size
- 21.1 KB
- Dependencies
- 0 dependencies · 3 peers
Pi manifest JSON
{
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-relace-provider
A pi extension that adds Relace as a model
provider. Relace exposes an OpenAI-compatible Chat Completions API at
https://models.relace.ai/v1, so this package registers it declaratively with
pi's built-in openai-completions implementation.
Models
| Model | Context | Max output | Reasoning |
|---|---|---|---|
deepseek-ai/DeepSeek-V4-Flash-0731 |
1M | 384K | yes |
Add more models (e.g. deepseek-ai/DeepSeek-V4-Pro-...) by copying a model
entry in index.ts and installing the updated package.
Install
From npm (once published) — listed on the Pi package marketplace
pi install npm:pi-relace-provider@0.1.3
This package is available on the Pi package marketplace (npm-backed). Publishing requires an npmjs.com account and a publish token; the manifest ships with keywords: ["pi-package"] so it registers for gallery discoverability.
Curl (one-liner)
curl -sfL https://raw.githubusercontent.com/shivamnarkar47/pi-relace-provider/main/install.sh | bash
The script installs the package into your user settings and reports next steps.
Manual
pi install https://github.com/shivamnarkar47/pi-relace-provider
DIY (copy the single file)
The whole extension is one self-contained file. Drop it in ~/.pi/agent/extensions/:
curl -sfL https://raw.githubusercontent.com/shivamnarkar47/pi-relace-provider/main/index.ts \
-o ~/.pi/agent/extensions/relace-provider.ts
Authentication
The package reads the API key from $RELACE_API_KEY (via apiKey: "$RELACE_API_KEY").
export RELACE_API_KEY="rlc-..."
Alternatively, run /login relace inside a session to store the key persistently
(pi writes it to ~/.pi/agent/auth.json).
Usage
# One-shot
pi --provider relace --model "deepseek-ai/DeepSeek-V4-Flash-0731" "Hello"
# Pick in the model switcher (Ctrl+P) after starting an interactive session
pi
Privacy
Your API key is referenced by environment variable ($RELACE_API_KEY) and is
never embedded in this repository. Credentials entered via /login are stored
only in pi's local auth.json.
License
Apache-2.0