@benvargas/pi-synthetic-provider
Synthetic (synthetic.new) model provider for pi - Dynamic model fetching with reasoning, vision, and tools support
Package details
Install @benvargas/pi-synthetic-provider from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@benvargas/pi-synthetic-provider- Package
@benvargas/pi-synthetic-provider- Version
1.1.12- Published
- May 1, 2026
- Downloads
- 258/mo · 53/wk
- Author
- benvargas
- License
- MIT
- Types
- extension
- Size
- 43.9 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"./extensions/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@benvargas/pi-synthetic-provider
Synthetic model provider for pi, the AI coding agent.
Features
- Dynamic model discovery -- models fetched live from the Synthetic API at each session start
- OpenAI Completions API -- reuses pi's built-in streaming, no custom implementation
- Tool calling -- full support via OpenAI-compatible tool use
- Vision support -- image input for models that support it (e.g., Kimi-K2.6)
- Reasoning support -- extended thinking for reasoning-capable models
- Cost tracking -- accurate per-token pricing parsed from the API
- Graceful degradation -- fallback model list if the API is unreachable
Installation
pi install npm:@benvargas/pi-synthetic-provider
Or try without installing:
pi -e npm:@benvargas/pi-synthetic-provider
Setup
Option 1: Environment Variable
export SYNTHETIC_API_KEY="syn_your_key_here"
pi
Option 2: Auth Storage (persistent)
Add to ~/.pi/agent/auth.json:
{
"synthetic": {
"type": "api_key",
"key": "syn_your_key_here"
}
}
Option 3: Runtime CLI Flag
pi --model synthetic/hf:moonshotai/Kimi-K2.6 --api-key syn_your_key_here
Usage
# Interactive model selection
pi /model
# Direct model selection
pi --model synthetic/hf:moonshotai/Kimi-K2.6
# Or use provider + model flags separately
pi --provider synthetic --model hf:moonshotai/Kimi-K2.6
Extension Command
/synthetic-models-- display all available models with pricing and capabilities/synthetic-quota-- display current Synthetic API quota usage, including rolling five-hour, weekly token, and search limits when available
Available Models
Models are fetched at startup from the Synthetic models endpoint. If the API is unreachable, the provider falls back to the following hardcoded defaults:
| Model | ID | Reasoning | Vision | Context | Max Output |
|---|---|---|---|---|---|
| Kimi K2.6 | hf:moonshotai/Kimi-K2.6 |
Yes | Yes | 262K | 65K |
| MiniMax M2.5 | hf:MiniMaxAI/MiniMax-M2.5 |
Yes | No | 191K | 65K |
| Nemotron 3 Super 120B | hf:nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4 |
Yes | No | 262K | 65K |
| GLM 5.1 | hf:zai-org/GLM-5.1 |
Yes | No | 196K | 65K |
Run /synthetic-models inside pi for the live catalog.
API Key Priority
When multiple sources are configured, pi checks in this order:
- CLI runtime flag (
--api-key) - Auth storage (
~/.pi/agent/auth.json) - OAuth credentials (if configured)
- Environment variable (
SYNTHETIC_API_KEY)
Requirements
- pi v0.70.2 or later
- A Synthetic API key from synthetic.new
Notes
- On newer Synthetic accounts,
/synthetic-quotaprefers the current rolling five-hour and weekly token limits over the legacy subscription bucket, while still showing search usage when present. - The provider refresh path is compatible with current pi releases that expect dynamic provider updates to go through
pi.registerProvider(...).
Uninstall
pi remove npm:@benvargas/pi-synthetic-provider
License
MIT