pi-particle

Particle AI provider for Pi: particle-1, DeepSeek V4.1 Flash and GLM 5.3 Flash on Particle's OpenAI-compatible API.

Packages

Package details

extension

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

$ pi install npm:pi-particle
Package
pi-particle
Version
1.0.4
Published
Oct 31, 2026
Downloads
1,045/mo · 393/wk
Author
heygarrison
License
MIT
Types
extension
Size
9 KB
Dependencies
0 dependencies · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ]
}

Security note

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

README

pi-particle

Particle AI as a Pi provider: an OpenAI-compatible inference platform for open-weight models.

pi install npm:pi-particle   # or: pi -e /path/to/pi-extensions/packages/pi-particle

Run /login particle and paste your key (keys look like pai-…), or set PARTICLE_API_KEY in your environment, and the models show up in /model as particle/particle-1 and friends.

Model Input Context $/1M in $/1M out
particle-1 — Particle-1 text, image 1M 0.25 1.00
deepseek-ai/deepseek-v41-flash-1017 — DeepSeek V4.1 Flash text, image 1M 0.25 1.00
glm-5.3-flash — GLM 5.3 Flash text, image 1M 0.12 0.40

Endpoint https://api.particle.ai/v1, bearer auth, api: "openai-completions" — Pi's built-in implementation does the request, stream and tool-call plumbing, so the whole extension is one pi.registerProvider call with the catalog above. Prices are per 1M tokens at Particle's peak (standard) rates from docs.particle.ai/usage-billing; off-peak is half of these.

The -1017 in DeepSeek's ID is a snapshot date — October 17 — matching 0731 for July 31. Particle serves that snapshot as the current public ID and still accepts the earlier ones (deepseek-v4-flash-0731, deepseek-v4-flash, deepseek-v4.1-flash) as aliases on requests, though /v1/models does not advertise them.

Pi's thinking levels map onto Particle's reasoning_effort ladder (none | low | high | xhigh | max; minimal/medium collapse onto low/high). GLM 5.3 Flash always reasons — Particle rejects reasoning_effort: "none" with a 400 — so off is marked unsupported (null) for that model rather than sent.

Development

pnpm test        # tsc --noEmit && node test.ts — offline unit tests
bash scripts/smoke.sh particle   # real requests, from the repo root; needs a key

test.ts loads the extension with a fake Pi and checks the registration: the provider config (api, authHeader, the $PARTICLE_API_KEY fallback) and every model in the catalog — id, name, modalities, context/output limits, costs, uniqueness, and that every Pi thinking level is either mapped to a provider value or explicitly unsupported. It never touches the network, which also means it cannot notice a provider changing under it: that is what scripts/smoke.sh (or pnpm smoke at the repo root) is for — it checks each declared model against the IDs Particle actually serves and sends one request per model.

MIT licensed.