@benvargas/pi-synthetic-provider

Synthetic (synthetic.new) model provider for pi - Dynamic model fetching with reasoning, vision, and tools support

Packages

Package details

extension

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.15
Published
Jun 18, 2026
Downloads
550/mo · 48/wk
Author
benvargas
License
MIT
Types
extension
Size
48.2 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 startup fetch fails, times out after three seconds, or returns no supported models, the provider falls back to the following hardcoded defaults:

Model ID Reasoning Vision Context Max Output
Synthetic Large Text syn:large:text Yes No 524K 65K
Synthetic Small Text syn:small:text Yes No 196K 65K
Synthetic Large Vision syn:large:vision Yes Yes 262K 65K
Synthetic Small Vision syn:small:vision Yes Yes 262K 65K
GLM 5.2 hf:zai-org/GLM-5.2 Yes No 524K 65K
GLM 5.1 hf:zai-org/GLM-5.1 Yes No 196K 65K
Kimi K2.6 hf:moonshotai/Kimi-K2.6 Yes Yes 262K 65K
Qwen 3.6 27B hf:Qwen/Qwen3.6-27B Yes Yes 262K 65K
MiniMax M3 hf:MiniMaxAI/MiniMax-M3 Yes Yes 524K 65K
GLM 4.7 Flash hf:zai-org/GLM-4.7-Flash Yes No 196K 65K
Nemotron 3 Super 120B hf:nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4 Yes No 262K 65K
GLM 4.7 hf:zai-org/GLM-4.7 Yes No 203K 65K
GPT OSS 120B hf:openai/gpt-oss-120b No No 131K 32K
Qwen 3.5 397B A17B hf:Qwen/Qwen3.5-397B-A17B No Yes 262K 32K

Run /synthetic-models inside pi for the live catalog.

API Key Priority

When multiple sources are configured, pi checks in this order:

  1. CLI runtime flag (--api-key)
  2. Auth storage (~/.pi/agent/auth.json)
  3. OAuth credentials (if configured)
  4. Environment variable (SYNTHETIC_API_KEY)

Requirements

Notes

  • On newer Synthetic accounts, /synthetic-quota prefers 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