@aliou/pi-synthetic
v0.8.1
Published
A Pi extension that adds [Synthetic](https://synthetic.new) as a model provider, giving you access to open-source models through an OpenAI-compatible API.
Readme
Pi Synthetic Extension
A Pi extension that adds Synthetic as a model provider, giving you access to open-source models through an OpenAI-compatible API.
Installation
Get API Key
Sign up at synthetic.new to get an API key (referral link).
Set Environment Variable
export SYNTHETIC_API_KEY="your-api-key-here"Add to shell profile for persistence:
echo 'export SYNTHETIC_API_KEY="your-api-key-here"' >> ~/.zshrcInstall Extension
# From npm
pi install npm:@aliou/pi-synthetic
# From git
pi install git:github.com/aliou/pi-synthetic
# Local development
pi -e ./src/index.tsUsage
Once installed, select synthetic as your provider and choose from available models:
/model synthetic hf:moonshotai/Kimi-K2.5Web Search Tool
The extension registers synthetic_web_search — a zero-data-retention web search tool. Available when you have an active Synthetic subscription.
Reasoning Levels
For Synthetic models that support reasoning, Synthetic currently accepts only low, medium, and high reasoning effort values.
This extension clamps Pi reasoning levels to Synthetic's supported set:
minimal->lowlow->lowmedium->mediumhigh->highxhigh->high
Quotas Command
Check your API usage:
/synthetic:quotasAdding or Updating Models
Models are hardcoded in src/providers/models.ts. To add or update models:
- Edit
src/providers/models.ts - Add the model configuration following the
SyntheticModelConfiginterface - Run
pnpm run typecheckto verify
Development
Setup
git clone https://github.com/aliou/pi-synthetic.git
cd pi-synthetic
# Install dependencies (sets up pre-commit hooks)
pnpm install && pnpm preparePre-commit hooks run on every commit:
- TypeScript type checking
- Biome linting
- Biome formatting with auto-fix
Commands
# Type check
pnpm run typecheck
# Lint
pnpm run lint
# Format
pnpm run format
# Test
pnpm run testTest Locally
pi -e ./src/index.tsRelease
This repository uses Changesets for versioning.
Note: Automatic NPM publishing is currently disabled. To publish manually:
- Create a changeset:
pnpm changeset - Version packages:
pnpm version - Publish (when ready): Uncomment the publish job in
.github/workflows/publish.yml
Requirements
- Pi coding agent v0.50.0+
- SYNTHETIC_API_KEY environment variable
