pi-provider-sicau-pmt0.2.0
Pi provider for a self-hosted oh-pmt-api gateway (OpenAI-compatible), with dynamic model discovery, thinking-effort support and a /login API-key prompt
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
pi-provider-sicau-pmt
Pi provider for a self-hosted oh-pmt-api gateway (OpenAI-compatible). Adds the gateway's models to Pi with correct context windows, output limits and thinking-effort tables, and asks for the API key through /login instead of hand-editing config files.
Install
pi install npm:pi-provider-sicau-pmt
Then log in:
/login
Pick SICAU-PMT, paste your gateway API key. It is stored in ~/.pi/agent/auth.json as an api_key credential for the sicau-pmt provider.
To try it without installing:
pi -e npm:pi-provider-sicau-pmt
What it registers
The model list comes from the gateway's /v1/models at startup. Models added to the gateway show up in Pi without editing this package; the built-in table below is only a fallback for offline startup and the first run after install.
| Model | Context | Output | Thinking effort | Image input |
|---|---|---|---|---|
| Qwen-3.8-Flash | 180K | 131072 | low / medium / xhigh, off | no |
| DeepSeek-Flash | 1M | 131072 | low / high / max, off | no |
| GLM-5.3-Flash | 1M | 131072 | low / high / max | yes |
| MiniMax-M3.1-Flash | 1M | 128000 | low / medium / high / xhigh / max | yes |
| DeepSeek-V4.1-Flash | 1M | 128000 | low / high / max, off | yes |
| Space-Bunny | 1M | 128000 | low / medium / high / xhigh / max | yes |
| Step-5-Preview | 1M | 64000 | low / medium / high | yes |
The gateway's /v1/models publishes no capability metadata, so capabilities live in src/models.ts, keyed by upstream key. Context windows and output limits come from Qoder's official catalog and WorkBuddy's product config; effort tables come from the vendors' declared effort lists.
Duplicate display ids are collapsed: the gateway lists GLM-5.3-Flash and MiniMax-M3.1-Flash twice, once per upstream, and the id-form request always resolves to the same backend, so one entry is enough.
compat.supportsDeveloperRole is disabled on every model. Pi switches the system prompt to the developer role on any model with reasoning: true, and the Qoder upstream validates message roles against a serde enum that accepts only system, assistant, user and tool — a developer message rejects the whole request.
Point it at your own gateway
BASE_URL in src/index.ts is pinned to https://api.hhy.homes/v1. To use a different deployment, fork this package, change BASE_URL, and rewrite the capability table in src/models.ts for your models.
Requirements
- Pi 1.4.0 or newer — the model list is refreshed through
ProviderConfig.refreshModels. - A gateway that forwards
reasoning_effortand readsmax_completion_tokens. Gateways without that plumbing still work, but the thinking selector has no effect and the output limit falls back to the server default.
License
MIT