pi-custom-endpoint
Pi and Oh My Pi extension for managing custom providers through an interactive wizard.
Package details
Install pi-custom-endpoint from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-custom-endpoint- Package
pi-custom-endpoint- Version
0.5.0- Published
- Aug 21, 2026
- Downloads
- 367/mo · 32/wk
- Author
- theaux
- License
- MIT
- Types
- extension
- Size
- 63.1 KB
- Dependencies
- 1 dependency · 2 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-custom-endpoint
This project is a fork of the original ratatulieoi/better-custom repository.
A better way to add custom providers for Pi and Oh My Pi (OMP).
Features
- Add, edit, or delete custom providers from an interactive wizard
- Supports:
- OpenAI-compatible endpoints
- Anthropic-compatible endpoints
- Ollama-compatible endpoints
- Uses the running host's agent directory automatically
- Pi:
models.json - OMP:
models.yml/models.yaml
- Pi:
- API key modes:
- API key (stored verbatim in the active models config)
- none (writes a placeholder so the provider still loads)
- existing
$ENVand!commandkeys are still resolved when re-probing
- Auto-probe
/modelsfor OpenAI-compatible endpoints - Multi-select model picker for probed models
- Unique provider names — the wizard refuses to overwrite an existing provider
- Image input enabled by default (
input: ["text", "image"]) so vision-capable models receive images instead of having them silently dropped - Reasoning enabled by default at the
xhighceiling for newly added models - Safe delete flow for whole providers or individual models
Install
Pi
From npm:
pi install npm:pi-custom-endpoint
From GitHub:
pi install https://github.com/XOVIET-GAME/pi-custom-endpoint
Oh My Pi (OMP)
OMP requires Bun in system PATH to run omp install.
1-line Bun check & install (if not already installed):
- macOS / Linux (Bash/Zsh):
command -v bun >/dev/null 2>&1 || curl -fsSL https://bun.sh/install | bash - Windows (PowerShell):
if (-not (Get-Command bun -ErrorAction SilentlyContinue)) { irm bun.sh/install.ps1 | iex }
Install extension in OMP:
# From npm:
omp install pi-custom-endpoint
# From GitHub:
omp install https://github.com/XOVIET-GAME/pi-custom-endpoint
Update
Pi:
# Re-install from npm to update:
pi install npm:pi-custom-endpoint@latest
# Or update directly if installed via npm:
pi update pi-custom-endpoint
Oh My Pi (OMP):
# Update to latest npm release:
omp install pi-custom-endpoint@latest
# Or force re-install:
omp install pi-custom-endpoint --force
Uninstall / Remove
Pi:
pi remove pi-custom-endpoint
Oh My Pi (OMP):
omp plugin uninstall pi-custom-endpoint
Usage
After installing, reload pi if needed, then run:
/endpoint-custom
The wizard can:
- Add a provider
- Edit a provider
- Delete a provider
Add a provider
Guides you through:
- provider style (OpenAI / Anthropic / Ollama)
- endpoint
- provider name (must be unique)
- API key method (API key or none)
- model discovery (auto-probe
/models) or manual model entry
Newly added models default to input: ["text", "image"] and reasoning: true
at the xhigh ceiling. Tune any of this later via Edit provider.
Edit a provider
Pick a provider, then choose:
- Re-probe for new models — query
/modelsagain and add ones not yet configured - Set context window (all models) — apply one
contextWindowto every model - Edit per model — pick a model and edit a single field:
- Reasoning ceiling (
off→xhigh) - Vision (text+image vs text-only)
- Context window
- Max output tokens
- Headers / endpoint override (per-model
baseUrland JSONheaders) - Delete this model
- Reasoning ceiling (
- Add models manually
- Rename provider — change the provider name (key) in the active models config
Per-model edits change one field in place, so untouched fields (cost, headers, overrides) are preserved.
Delete a provider
Lists configured providers and removes the selected one after confirmation.
How reasoning maps to pi
pi exposes six thinking levels: off, minimal, low, medium, high, xhigh. When a
model has reasoning: true, pi treats minimal through high as available.
xhigh is opt-in and only unlocked when explicitly mapped, and any level set to
null is removed. The wizard writes a thinkingLevelMap to unlock xhigh or to
cap reasoning below high.
Configuration
The extension uses the host-provided agent directory instead of hard-coding
~/.pi/agent. Existing models.yml, models.yaml, or models.json files are
kept in their current format. A fresh OMP config is created as models.yml;
normal Pi continues to use models.json.
Saving YAML rewrites its formatting and does not preserve comments.
Files
index.ts— extension entry pointpackage.json— pi package manifest
License
MIT