pi-chutes
v1.0.0
Published
AI-powered bug detection and fixing extension for Pi coding agent
Maintainers
Readme
Pi Chutes Extension
A pi coding agent extension that provides access to models from Chutes.ai, a platform offering various open and proprietary LLM models via an OpenAI-compatible API.
Note: This extension was previously called "chutes-provider" and has been renamed to "pi-chutes" to follow pi extension naming conventions.
Features
- Automatic Model Discovery: Fetch the latest available models from chutes.ai
- Persistent Storage: Models are saved to a JSON file and loaded on startup
- Change Tracking: Shows what models were added, removed, or updated
- Multiple Input Types: Supports both text-only and vision (text + image) models
- Reasoning Detection: Automatically identifies models with reasoning capabilities
- Cost Tracking: Preserves pricing information from the API
Installation
Option 1: npm (recommended)
pi install npm:pi-chutesThen restart pi.
Option 2: Git
pi install git:github.com/mark182es/pi-chutesThen restart pi.
Option 3: Manual
If not present, create the directory and copy the files:
Create the directory:
mkdir -p ~/.pi/agent/extensions/pi-chutesCopy or create the
index.tsfile in that directory
Quick Start
After the extension is loaded, run these commands in pi:
# 1. Login with your API key (interactive - will prompt for key)
/login
# Select "Chutes.ai" from the list
# Enter your API key when prompted
# 2. Update models (fetches latest available models)
/chutes-update
# 3. Select a model
/model chutes
# Choose any model from the listUsage
Login (First Time Setup)
Use /login to authenticate with chutes.ai:
/loginThis will:
- Show a list of available providers
- Select "Chutes.ai" from the list
- Prompt you to enter your API key
- Save the credentials to
~/.pi/agent/auth.json
To logout and clear credentials:
/logout chutesModel Selection
Use the /model command to select a chutes model:
/model chutesThis will show all available chutes models in the model selector.
Updating Models
Run the /chutes-update command to fetch the latest models from chutes.ai:
/chutes-updateThis will:
- Fetch the current model list from
https://llm.chutes.ai/v1/models - Compare with previously saved models
- Show a summary of changes (added, removed, updated)
- Update the provider with new models
- Save models to
~/.pi/agent/extensions/pi-chutes/models.json
Example output:
Updated chutes models: +48 added, ~2 updated
Added: Qwen/Qwen3-32B, deepseek-ai/DeepSeek-V3-0324-TEE, ...
Updated: MiniMaxAI/MiniMax-M2.5-TEEConfiguration
Option 1: Using /login Command (Recommended)
The extension supports the /login command for easy API key setup:
/loginSelect "Chutes.ai" from the provider list and enter your API key when prompted.
Your API key will be saved to ~/.pi/agent/auth.json (as OAuth type) and will be used automatically.
Option 2: Environment Variable
| Variable | Description |
|----------|-------------|
| CHUTES_API_KEY | Your API key for chutes.ai |
Set the environment variable in your shell:
export CHUTES_API_KEY=sk-...Option 3: Auth File
You can manually add your API key to ~/.pi/agent/auth.json:
{
"chutes": { "type": "api_key", "key": "sk-..." }
}Option 4: .env File
Create a .env file in the extension directory:
CHUTES_API_KEY=sk-...JSON Configuration
You can also configure models via ~/.pi/agent/models.json:
{
"providers": {
"chutes": {
"baseUrl": "https://llm.chutes.ai/v1",
"apiKey": "CHUTES_API_KEY",
"api": "openai-completions",
"models": []
}
}
}
}Note: The extension's /chutes-update command will override any manually configured models.
Model Properties
The extension automatically converts these properties from the chutes API:
| API Field | Model Property | Description |
|-----------|----------------|-------------|
| id | id | Model identifier |
| id | name | Display name |
| supported_features includes "reasoning" | reasoning | Supports extended thinking |
| input_modalities | input | ["text"] or ["text", "image"] |
| pricing.prompt | cost.input | Input cost per 1M tokens |
| pricing.completion | cost.output | Output cost per 1M tokens |
| pricing.input_cache_read | cost.cacheRead | Cache read cost per 1M tokens |
| context_length / max_model_len | contextWindow | Context window size |
| max_output_length | maxTokens | Maximum output tokens |
Files
index.ts- Main extension codemodels.json- Saved models (created after first/chutes-update).env- API key storage (optional, not needed if using/login)
Commands
| Command | Description |
|---------|-------------|
| /chutes-update | Fetch latest models from chutes.ai |
| /login | Login to chutes.ai (select Chutes.ai from the list) |
| /logout chutes | Logout and clear stored credentials |
Troubleshooting
"Failed to update models" error
- Check your internet connection
- Verify
CHUTES_API_KEYis set correctly - Check if chutes.ai API is operational
Models not appearing
- Run
/chutes-updateto fetch models - Make sure the API key is valid
- Try reloading extensions with
/reload
API Key Issues
The extension expects the environment variable CHUTES_API_KEY to be set. You can:
Export it in your shell:
export CHUTES_API_KEY=your_keyOr add it to a
.envfile in the extension directory
License
This extension is provided as-is for use with pi coding agent.
