pi-runinfra-provider
v1.2.1
Published
RunInfra provider extension for pi - Access DeepSeek V4, Nemotron 3.5 Lightning, and Qwen3.8 models through the RunInfra gateway
Maintainers
Readme
🏃 pi-runinfra-provider
DeepSeek V4, Nemotron 3.5 Lightning & Qwen3.8 through RunInfra
A pi provider extension for RunInfra's OpenAI-compatible inference gateway.
Features
- 10 AI Models covering the full RunInfra lineup: DeepSeek V4 Flash, DeepSeek V4 Pro, Nemotron 3.5 Lightning 30B, Ornith 1.5 35B, Qwen3.8 2.4T A95B, Qwen3.8 27B, Parakeet TDT 0.6B v3, and the Qwen3 embedding/reranker models
- OpenAI-Compatible API — Just change the base URL and API key
- Cost Tracking — Per-model pricing for budget management
- Reasoning Models — Extended thinking via
reasoning_contentfield - Reasoning Effort — Control reasoning depth on DeepSeek V4 (including
max) and other reasoning models - Request Tracing — Automatic
X-Client-Request-IdUUID header on every request for server-side observability
Installation
Option 1: Using pi install (Recommended)
Install directly from GitHub:
pi install https://github.com/monotykamary/pi-runinfra-providerThen set your API key and run pi:
# Recommended: add to auth.json
# See Authentication section below
# Or set as environment variable
export RUNINFRA_GATEWAY_KEY=your-api-key-here
piOption 2: Manual Clone
Clone this repository:
git clone https://github.com/monotykamary/pi-runinfra-provider.git cd pi-runinfra-providerSet your RunInfra gateway key:
# Recommended: add to auth.json # See Authentication section below # Or set as environment variable export RUNINFRA_GATEWAY_KEY=your-api-key-hereRun pi with the extension:
pi -e /path/to/pi-runinfra-provider
Available Models
| Model | Context | Vision | Reasoning | Input $/M | Cache Read $/M | Output $/M | |-------|---------|--------|-----------|-----------|-----------------|------------| | DeepSeek V4 Flash | 1.0M | ❌ | ✅ | $0.13 | $0.01 | $0.27 | | DeepSeek V4 Pro | 1.0M | ❌ | ✅ | $0.60 | $0.03 | $1.90 | | GLM 5.3 Flash | 1.0M | ✅ | ✅ | $0.10 | $0.01 | $0.40 | | Nemotron 3.5 Lightning 30B | 262K | ❌ | ✅ | $0.05 | $0.01 | $0.15 | | Ornith 1.5 35B | 262K | ✅ | ✅ | $0.10 | $0.01 | $0.40 | | Parakeet TDT 0.6B v3 | 131K | ❌ | ❌ | $10.00 | — | — | | Qwen3 Embedding 0.6B | 33K | ❌ | ❌ | $0.01 | — | — | | Qwen3 Embedding 8B | 33K | ❌ | ❌ | $0.05 | — | — | | Qwen3 Reranker 8B | 16K | ❌ | ❌ | $0.05 | — | — | | Qwen3.8 2.4T A95B | 262K | ❌ | ✅ | $2.00 | $0.20 | $6.00 | | Qwen3.8 27B | 262K | ❌ | ✅ | $0.10 | $0.01 | $0.40 |
Costs are per million tokens. Prices subject to change — check RunInfra for current pricing.
Usage
After loading the extension, use the /model command in pi to select your preferred model:
/model runinfra deepseek-v4-flashOr start pi directly with a RunInfra model:
pi --provider runinfra --model deepseek-v4-flashAuthentication
The RunInfra gateway key can be configured in multiple ways (resolved in this order):
auth.json(recommended) — Add to~/.pi/agent/auth.json:
The{ "runinfra": { "type": "api_key", "key": "your-api-key" } }keyfield supports literal values, env var names, and shell commands (prefix with!). See pi's auth file docs for details.- Runtime override — Use the
--api-keyCLI flag - Environment variable — Set
RUNINFRA_GATEWAY_KEY
Environment Variables
| Variable | Required | Description |
|----------|----------|-------------|
| RUNINFRA_GATEWAY_KEY | No | Your RunInfra gateway key (fallback if not in auth.json) |
Configuration
Add to your pi configuration for automatic loading:
{
"extensions": [
"/path/to/pi-runinfra-provider"
]
}Compat Settings
RunInfra's API follows the OpenAI Chat Completions API:
supportsDeveloperRole: false— All models. RunInfra uses standard OpenAI roles.maxTokensField: "max_tokens"— All models. RunInfra acceptsmax_tokens.thinkingFormat: "deepseek"— DeepSeek V4 Flash / V4 Pro. Reasoning is toggled via athinkingparameter and effort is sent asreasoning_effort(pi maps Shift+Tab levels tolow/high/max).thinkingFormat: "openai"— Nemotron 3.5 Lightning, Ornith 1.5 35B, and Qwen3.8. Returns thinking in thereasoning_contentfield.supportsReasoningEffort: true— All reasoning models. Supports thereasoning_effortparameter.supportsStore: false— All models. RunInfra doesn't support thestoreparameter.
Request Tracing
Every request to RunInfra automatically includes a fresh X-Client-Request-Id header containing a UUID. This matches RunInfra's recommended tracing header and makes it easy to correlate client sessions with server-side logs.
Patch Overrides
The patch.json file contains overrides that are applied on top of models.json data. This is useful for:
- Marking models as reasoning-capable when the API doesn't report it
- Filling in pricing for models where the API returns empty values
- Adding compat settings (thinking format, reasoning effort, level maps)
- Setting
thinkingFormat: "deepseek"andthinkingLevelMapfor the DeepSeek V4 models
Custom Models
The custom-models.json file contains full model definitions for models that need manual curation beyond what the API provides, or models not yet available from the API. These are merged in after patch application, taking precedence for matching IDs.
Merge order: [live|cache|embedded] → patch.json → custom-models.json
Updating Models
Run the update script to fetch the latest models from RunInfra's API:
export RUNINFRA_GATEWAY_KEY=your-api-key
node scripts/update-models.jsThis will:
- Fetch models from
https://api.runinfra.ai/v1/models - Preserve existing model data (pricing, compat) for known models
- Apply overrides from
patch.json - Update
models.jsonand the README model table
To regenerate just the README model table from local data — no API key needed, useful for offline curation:
node scripts/update-models.js --readme-onlyLicense
MIT
