pi-provider-melious

Pi extension that registers Melious (melious.ai) as an OpenAI-compatible LLM provider.

Packages

Package details

extension

Install pi-provider-melious from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-provider-melious
Package
pi-provider-melious
Version
0.2.0
Published
Sep 13, 2026
Downloads
334/mo · 5/wk
Author
chartinger
License
MIT
Types
extension
Size
9.1 KB
Dependencies
0 dependencies · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./extensions"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

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 melious provider via the recommended createProvider() form.
  • Uses pi's built-in openai-completions streaming implementation.
  • Auth is handled by pi: a stored melious credential in auth.json, the MELIOUS_API_KEY environment 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 fetchModels after /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

  • createProvider does not stamp provider, baseUrl, or api onto models. Each catalog entry must carry them itself. Omitting provider crashes the /model selector sort; omitting baseUrl crashes streaming with Cannot read properties of undefined (reading 'includes').
  • Only one extension may register the melious provider id. Do not ship the old melious.ts alongside 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.