Licence
MIT
Version
0.1.1
Deps
0
Size
9 kB
Vulns
0
Weekly
0
pi-provider-melious
A pi extension that registers Melious as an OpenAI-compatible LLM provider.
Repository: https://github.com/chartinger/pi-provider-melious
What it does
- Registers the
meliousprovider via the recommendedcreateProvider()form. - Uses pi's built-in
openai-completionsstreaming implementation. - Auth is handled by pi: a stored
meliouscredential inauth.json, theMELIOUS_API_KEYenvironment variable, or/login melious. - Fetches the live Melious chat model catalog (
/models?include_meta=true):- seeded eagerly at startup when a key is present, so models appear immediately (no "no models available" warning);
- refreshed dynamically via
fetchModelsafter/login.
Install
From npm (preferred):
pi install npm:pi-provider-melious
Or directly from GitHub (fallback / for testing a pinned version):
pi install git:github.com/chartinger/pi-provider-melious@v0.1.1
To try it without installing:
pi -e npm:pi-provider-melious
Then, once per machine:
pi /login melious # stores the key in ~/.pi/agent/auth.json
# or
export MELIOUS_API_KEY=...
Usage
pi --list-models
pi --provider melious --model <id> "hello"
In interactive mode use /model to pick a Melious model.
Notes / gotchas
createProviderdoes not stampprovider,baseUrl, orapionto models. Each catalog entry must carry them itself. Omittingprovidercrashes the/modelselector sort; omittingbaseUrlcrashes streaming withCannot read properties of undefined (reading 'includes').- Only one extension may register the
meliousprovider id. Do not ship the oldmelious.tsalongside this one. - Credentials live per-machine in
~/.pi/agent/auth.json/ env vars; they are never part of the package.
Development
npm install
npm run typecheck
Layout
extensions/melious-provider.ts # the extension entry point
package.json # pi package manifest + metadata
License
MIT — see LICENSE.