Install
Install with PiG
pig install npm:pi-0g-providerInstall with Pi
pi install npm:pi-0g-providerReview 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": [
"./index.ts"
]
}README
Written by the package's publisher, shown as published in version 0.1.0 (README.md). PiG does not review it.
pi-0g
A pi provider for 0G: every chat model 0G's router serves,
sent as OpenAI chat completions to https://router-api.0g.ai/v1.
Install
pi install npm:pi-0g-provider # or: pi install git:github.com/jake11-oho/pi-0g
export OG_API_KEY=sk-... # an API key from https://pc.0g.ai
pi --model 0g/glm-5.3-flash
pi --list-models 0g lists the models.
What it does
- Models come from 0G's public catalog (
GET /v1/models, no key needed) at startup, so new models appear without updating this package. Context window, output limit, image input and prices are the catalog's. If the catalog cannot be reached, the last one fetched is used (cached in pi's agent directory,cache/0g-models.json). - Thinking levels follow what 0G measured for each model (the catalog's
reasoningfield):offsendsreasoning_effort: "none"only for models where that was measured to turn thinking off. Elsewhereoffsends nothing, and the model thinks as it does by default.- When some levels were measured to change how much the model thinks, only those are offered.
- Models not measured yet keep pi's defaults (
offthroughhigh, sent asreasoning_effort).
- Requests carry
X-Title: PiandHTTP-Referer: https://pi.dev.
OG_BASE_URL points it at another 0G router, e.g. staging
(https://router-api-staging.0g.ai/v1).
Develop
bun test ./models.test.ts # catalog mapping
pi -e ./index.ts --list-models 0g