Pi extension that dynamically fetches all available models from Featherless.ai and registers them as an OpenAI-compatible provider.
TypeScript · pi Extension API
Requires FEATHERLESS_API_KEY set in the environment.
pi install git:github.com/Mearman/pi-extension-featherlesspi -e git:github.com/Mearman/pi-extension-featherlesspi -e /path/to/pi-extension-featherlessNo dependencies to install — the extension runs directly from index.ts via pi's extension loader.
Single entry point (index.ts) that:
- Fetches
https://api.featherless.ai/v1/modelsat load time and maps every returned model to pi's provider model schema. - Registers a
"featherless"provider with OpenAI-completions API compatibility. - Intercepts
message_endevents to rewrite Featherless-specific context overflow error messages into thecontext_length_exceededpattern pi recognises.
All models are free-tier (cost: { input: 0, output: 0 }). Context window and max completion tokens are sourced from the API response.
- No build step — pi loads the extension directly from TypeScript.
- The
clean,build, andcheckscripts are placeholders and do nothing.