@floez-werk/piagent-private-ai0.1.2
Pi extension: use private-ai (privatemode.ai) models as a provider
Untested on omp
This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.
Reports 0
No reports yet.
Readme
piagent-private-ai
Pi extension: use private-ai (Privatemode) models as a provider
Table of contents
Behavior
Registers private-ai as a Pi model provider backed by
Privatemode - an OpenAI-compatible chat
endpoint operated inside confidential computing environments by
Edgeless Systems. No Pi service is involved.
Connection modes
The connection is configured via the privateAi settings key (user settings
~/.pi/agent/settings.json or project settings .pi/settings.json):
| Setting | Default | Description |
|---|---|---|
privateAi.mode |
"proxyless" |
"proxyless" uses the hosted proxyless API (memory encryption, no client-side attestation). "proxy" calls a locally running Privatemode proxy, which verifies the backend attestation and encrypts prompts client-side. |
privateAi.proxyBaseUrl |
http://localhost:8080/v1 |
Base URL of the proxy in "proxy" mode (e.g. a remote proxy at http://raspberrypi:3003/v1). |
privateAi.proxyApiKey |
$PRIVATEMODE_API_KEY |
API key sent to the proxy in "proxy" mode. Supports $ENV interpolation, a literal value, or !command (like models.json). |
Example:
{
"privateAi": {
"mode": "proxy",
"proxyBaseUrl": "http://raspberrypi:3003/v1"
}
}
Settings changes require a pi restart or /reload.
Models
The following chat models appear under the private-ai provider
(see the Privatemode model overview):
| Model ID | Alias | Context | Input | Reasoning effort |
|---|---|---|---|---|
glm-5.3 |
glm-latest |
1M | text | low / high / max |
glm-5.3-flash |
glm-flash-latest |
1M | text, image | low / high / max |
gpt-oss-120b |
- | 128k | text | low / medium / high |
- All models stream, support tool calling and always perform reasoning; the pi
thinking level is forwarded as
reasoning_effortand thereasoningfield of the response is shown as thinking. - Embedding, speech-to-text and the DeepSeek-OCR-2 models are not exposed (they are not chat models / need a special prompt format).
- Privatemode prices are EUR per million tokens (pricing); the EUR values are used as-is for the cost display.
Authentication
Create an API key in the Privatemode portal and store it exactly like any other provider credential:
/login private-ai
Pi prompts Enter API key and saves the credential in auth.json; the models
then appear in /models (and /logout private-ai removes it again).
Alternatives, in precedence order:
auth.jsonvia/login private-ai(stored credential wins over everything below)PRIVATEMODE_API_KEYenvironment variable:export PRIVATEMODE_API_KEY="<your-api-key>"privateAi.proxyApiKeyfrom settings (proxy mode only; supports$ENVinterpolation, literals, or!command)
Without any credential the models are registered but hidden from the picker,
like every other provider - Pi suggests /login in that case.
Project-level .pi/settings.json values apply at session start (after
project trust); the extension reads privateAi from the user-level
settings.json directly at load so the models are known without a session
(pi --list-models, startup model selection).
Installation
Local (development):
pi -e ./extensions/piagent-private-ai.ts
As a pi package (GitHub or npm):
pi install git:https://github.com/FloezWerk/piagent-private-ai.git
# or
pi install npm:@floez-werk/piagent-private-ai
The npm package is listed in the pi package catalog
automatically (keyword pi-package).
Commands
| Command | Effect |
|---|---|
/private-ai |
Show provider status: connection mode, base URL, the resolved auth source, the current model (if it is a private-ai model) and the available models. |
/private-ai <model-id> |
Switch the current session to a private-ai model, e.g. /private-ai glm-latest. |
After changes in a running session: /reload.
Dependencies
@earendil-works/pi-ai, @earendil-works/pi-coding-agent and
@earendil-works/pi-tui are bundled by pi and are therefore only declared as
peerDependencies.
Changelog
Notable changes per version are documented in CHANGELOG.md.
Every tagged release (vX.Y.Z) is published to npm and appears as a
GitHub release with the
package tarball.
0.1.2 - 2026-10-13
Changed
- Published to npm via trusted publishing instead of a stored npm token.
Full history and all versions: CHANGELOG.md