@computesdk/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 @computesdk/pi-particle from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@computesdk/pi-particle
Package
@computesdk/pi-particle
Version
1.0.0
Published
Oct 30, 2026
Downloads
492/mo · 492/wk
Author
kisernl
License
MIT
Types
extension
Size
6.9 KB
Dependencies
0 dependencies · 1 peer
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

@computesdk/pi-particle

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

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

Set PARTICLE_API_KEY (keys look like pai-…) 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.

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

test.ts loads the extension with a fake Pi and checks every registered model: id, name, modalities, context/output limits, costs, uniqueness, and that every Pi thinking level is either mapped to a provider value or explicitly unsupported.

MIT licensed.