@openference/pi-provider
Official Openference provider for Pi — device-flow OAuth login, live model discovery, and plan-aware pacing
Package details
Install @openference/pi-provider from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@openference/pi-provider- Package
@openference/pi-provider- Version
0.1.1- Published
- Jul 30, 2026
- Downloads
- 276/mo · 13/wk
- Author
- anhlead
- License
- MIT
- Types
- extension
- Size
- 57.4 KB
- Dependencies
- 0 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./src/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@openference/pi-provider
Official Openference provider for Pi.
Signs in with the same Openference OAuth device flow used by first-party apps: Pi prints a link you click or copy into a browser, you approve, and models load automatically with correct context windows, pricing, and plan-aware request pacing.
Install
pi install npm:@openference/pi-provider
Restart Pi, then:
/login openference
/model openference/GLM-5.2
Choose Browser link when prompted. Open the printed URL, sign in to Openference if needed, and approve. Pi stores tokens in ~/.pi/agent/auth.json.
You can also paste an API key (secondary option) or set OPENFERENCE_API_KEY.
What this package configures
- Live model list from
GET /v1/models(respects your key’s model restrictions; run/reloadafter changes) - Safe context windows and max output tokens so Pi compacts at the right time
- Thinking / reasoning levels from each model’s supported efforts
- Soft pacing from your plan’s RPM limit, and correct handling of
Retry-Afteron rate limits - Automatic recovery when a prompt exceeds the model context
If you keep hitting plan limits, upgrade or add credits — the package already respects your allowance.