@benvargas/pi-synthetic-provider
v1.1.7
Published
Synthetic (synthetic.new) model provider for pi - Dynamic model fetching with reasoning, vision, and tools support
Maintainers
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.5)
- 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-providerOr try without installing:
pi -e npm:@benvargas/pi-synthetic-providerSetup
Option 1: Environment Variable
export SYNTHETIC_API_KEY="syn_your_key_here"
piOption 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 --api-key synthetic=syn_your_key_hereUsage
# Interactive model selection
pi /model
# Direct model selection
pi --model synthetic:hf:moonshotai/Kimi-K2.5
# Use default Synthetic model
pi --model syntheticExtension Command
/synthetic-models-- display all available models with pricing and capabilities
Available Models
Models are fetched dynamically. As of 2026-01-29, Synthetic provides:
| Model | ID | Reasoning | Vision | Context | Max Output |
|-------|-----|-----------|--------|---------|------------|
| Kimi K2.5 | hf:moonshotai/Kimi-K2.5 | Yes | Yes | 262K | 65K |
| MiniMax M2.1 | hf:MiniMaxAI/MiniMax-M2.1 | Yes | No | 196K | 65K |
| GLM 4.7 | hf:zai-org/GLM-4.7 | Yes | No | 202K | 65K |
Run /synthetic-models inside pi for the full, current 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.51.0 or later
- A Synthetic API key from synthetic.new
Uninstall
pi remove npm:@benvargas/pi-synthetic-providerLicense
MIT
