← Catalog

@floez-werk/piagent-private-ai

Pi extension: use private-ai (privatemode.ai) models as a provider

Extension

Install

Install with PiG

pig install npm:@floez-werk/piagent-private-ai

Install with Pi

pi install npm:@floez-werk/piagent-private-ai
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./extensions"
  ]
}

README

Written by the package's publisher, shown as published in version 0.1.2 (README.md). PiG does not review it.

piagent-private-ai

npm license CI changelog

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):

SettingDefaultDescription
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.proxyBaseUrlhttp://localhost:8080/v1Base URL of the proxy in "proxy" mode (e.g. a remote proxy at http://raspberrypi:3003/v1).
privateAi.proxyApiKey$PRIVATEMODE_API_KEYAPI 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 IDAliasContextInputReasoning effort
glm-5.3glm-latest1Mtextlow / high / max
glm-5.3-flashglm-flash-latest1Mtext, imagelow / high / max
gpt-oss-120b-128ktextlow / medium / high
  • All models stream, support tool calling and always perform reasoning; the pi thinking level is forwarded as reasoning_effort and the reasoning field 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:

  1. auth.json via /login private-ai (stored credential wins over everything below)
  2. PRIVATEMODE_API_KEY environment variable: export PRIVATEMODE_API_KEY="<your-api-key>"
  3. privateAi.proxyApiKey from settings (proxy mode only; supports $ENV interpolation, 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

CommandEffect
/private-aiShow 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