pi-runinfra
RunInfra.ai model provider extension for pi — DeepSeek V4 Flash/Pro, Nemotron 3.5 Lightning, Qwen3.8, GLM 5.3 Flash
Package details
Install pi-runinfra from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-runinfra- Package
pi-runinfra- Version
1.1.0- Published
- Aug 27, 2026
- Downloads
- 419/mo · 71/wk
- Author
- preinpost
- License
- MIT
- Types
- extension
- Size
- 15.3 KB
- Dependencies
- 0 dependencies · 1 peer
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-runinfra
RunInfra.ai model provider extension for pi.
Registers the RunInfra OpenAI-compatible endpoint as the runinfra provider
with its current model catalog, including cost metadata, reasoning-level
mapping, and the per-request X-Client-Request-Id header RunInfra's API
examples expect.
Models
Prices per 1M tokens (as shown on the RunInfra dashboard).
| Model (id) | Input | Output | Context | State |
|---|---|---|---|---|
deepseek-v4-flash |
$0.13 | $0.27 | 1M | Available (cached input $0.01) |
deepseek-ai/DeepSeek-V4-Pro-0813 |
$0.60 | $1.90 | 1M | Currently unavailable |
nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16 |
$0.05 | $0.15 | 256K | Available |
Qwen/Qwen3.8-27B |
$0.10 | $0.40 | 256K | Available |
Inferact/Qwen3.8-2.4T-A95B-NVFP4 |
$2.00 | $6.00 | 256K | Available |
zai-org/GLM-5.3-Flash |
$0.10 | $0.40 | 1M | Available (cached input $0.01, image input) |
Install
pi install npm:pi-runinfra
Or try it without installing:
pi -e npm:pi-runinfra
If you previously used the standalone extension at
~/.pi/agent/extensions/runinfra.ts, remove it to avoid double registration:rm ~/.pi/agent/extensions/runinfra.ts
API Key
Register your RunInfra workspace key (from https://runinfra.ai → API keys) one of these ways — any order:
# 1) Environment variable (matches RunInfra's own docs)
export RUNINFRA_GATEWAY_KEY=sk-...
pi
# 2) pi's native login (stores the key in ~/.pi/agent/auth.json)
/login runinfra
# 3) This package's command (writes ~/.pi/agent/auth.json directly)
/runinfra-key
Usage
# pick a model interactively
/model → runinfra/deepseek-v4-flash
# or start pi directly on it
pi --provider runinfra --model deepseek-v4-flash
Behavior Notes
- Reasoning: RunInfra always applies reasoning to DeepSeek models.
Omitting
reasoning_effortmeans maximum effort (more tokens, slower, costlier). The extension maps pi thinking levels to explicit effort values (minimal/low → "low",medium → "medium",high → "high",xhigh/max → "max").offis not available for DeepSeek models. If RunInfra rejects a value, editthinkingLevelMapinextensions/runinfra.ts. - Qwen / Nemotron: registered without thinking parameters since RunInfra's
support is undocumented. If RunInfra accepts
enable_thinking, flipreasoning: trueand addcompat.thinkingFormat: "qwen". - GLM 5.3 Flash: always-on reasoning (thinking cannot be disabled). Effort
maps to GLM-5.3 values (
low/high/max);off/minimal/medium/xhighare hidden. Native multimodal —inputincludesimage. The API request generator also shows the short aliasglm-5-3-flash. X-Client-Request-Id: a per-request UUID is added to every request via thebefore_provider_headersevent (retries reuse the same id).- System role:
supportsDeveloperRole: false— the system prompt is sent assystem, notdeveloper, matching DeepSeek/Qwen-style endpoints.
Overrides
models.json overrides compose above this extension's provider, so you can
tune prices, context windows, or endpoints without editing the package:
{
"providers": {
"runinfra": {
"modelOverrides": {
"deepseek-v4-flash": {
"maxTokens": 65536,
"cost": { "input": 0.1, "output": 0.25 }
}
}
}
}
}
Development
npm pack --dry-run # inspect the publish contents
npm login
npm publish # manual one-off publish (alternative to the CI flow below)
Release Flow (GitHub Actions)
Pushing to main triggers .github/workflows/release.yml, which — no release
PRs involved:
- Detect bump type from conventional commits since the last
v*tag (feat:→ minor,fix:/perf:→ patch, breaking change → major). Commits that don't warrant a release (docs:,chore:,ci:, …) are skipped. - Bump & tag: runs
npm version, commitschore(release): vX.Y.Zdirectly tomain, pushes thevX.Y.Ztag. - GitHub Release with auto-generated notes.
- npm publish with
npm publish --provenanceusing theNPM_TOKENsecret.
A manual fallback exists via the "Publish to npm (manual)" workflow
(workflow_dispatch), e.g. to re-publish a release that happened before
NPM_TOKEN was set.
Commit message conventions
feat: add a new model → minor bump (0.x: 0.1.0 → 0.2.0)
fix: correct pricing metadata → patch bump (0.1.0 → 0.1.1)
feat!: change provider id → major bump
docs:/chore:/ci: → no release
Setup checklist
- Repo is on GitHub and
NPM_TOKENis set in repo Settings → Secrets and variables → Actions (npm token, "Automation" type to bypass 2FA). - Push a conventional commit to
main— release + npm publish happen automatically.
npm publish --provenance uses GitHub OIDC (sigstore) and requires the
repository field in package.json (already set); remove the
--provenance flag and the id-token: write permission if you don't want it.
License
MIT