pi-tarmis-provider
v1.1.9
Published
Tarmis provider extension for pi - Open models on Tarmis's own GPUs via an OpenAI-compatible API
Maintainers
Readme
🪐 pi-tarmis-provider
Open models on Tarmis's own GPUs for pi
One OpenAI-compatible API to open models on Tarmis's own GPUs — DeepSeek, GLM, Kimi, MiniMax, and more.
Features
- OpenAI-compatible API — Uses Tarmis's
/v1/chat/completionsendpoint - Rich auto-synced catalogue — The Tarmis
/v1/modelsendpoint returns per-model pricing, context windows, max output, modalities, and supported features;models.jsonis generated directly from it - Public model list —
/v1/modelsis unauthenticated, so pi lists Tarmis models (and the background model sync runs) even before you set a key - Reasoning models — Thinking models are detected from the API's
supported_featuresand configured forreasoning_effortcontrol - Vision models — Image input is auto-detected from
input_modalities - Tool use — Function calling for models that advertise
toolssupport - Streaming — Real-time token streaming
- Prompt caching — Cached input is billed at a cheaper rate when the API reports an
input_cache_readprice
Available Models
| Model | Context | Vision | Reasoning | Input $/M | Cache Read $/M | Output $/M | |-------|---------|--------|-----------|-----------|-----------------|------------| | DeepSeek V4 Flash | 1.0M | ❌ | ✅ | $0.09 | $0.02 | $0.18 | | DeepSeek V4 Pro | 1.0M | ❌ | ✅ | $0.43 | $0.09 | $0.87 | | GLM-5.2 | 1.0M | ❌ | ✅ | $0.60 | $0.14 | $2.20 | | Kimi K3 | 1.0M | ✅ | ✅ | $2.50 | $0.25 | $10.00 | | MiniMax M3 | 524K | ❌ | ✅ | $0.30 | $0.06 | $1.20 |
The table above is regenerated by
node scripts/update-models.jsfrom the live Tarmis API. Costs are per million tokens (the API reports per-token prices). Prices subject to change — check docs.tarmis.ai/docs/pricing for current pricing.
Installation
Option 1: Using pi install (Recommended)
Install from npm (published as pi-tarmis-provider) or directly from GitHub:
# From npm
pi install npm:pi-tarmis-provider
# Or directly from GitHub
pi install https://github.com/monotykamary/pi-tarmis-providerThen set your API key and run pi:
# Recommended: add to auth.json
# See Authentication section below
# Or set as environment variable
export TARMIS_API_KEY=your-api-key-here
piGet your API key from tarmis.ai.
Option 2: Manual Clone
Clone this repository:
git clone https://github.com/monotykamary/pi-tarmis-provider.git cd pi-tarmis-providerSet your Tarmis API key:
# Recommended: add to auth.json # See Authentication section below # Or set as environment variable export TARMIS_API_KEY=your-api-key-hereRun pi with the extension:
pi -e /path/to/pi-tarmis-provider
Authentication
The Tarmis API key can be configured in multiple ways (resolved in this order):
auth.json(recommended) — Add to~/.pi/agent/auth.json:
The{ "tarmis": { "type": "api_key", "key": "your-api-key" } }keyfield supports literal values, env var names, and shell commands (prefix with!). See pi's auth file docs for details.- Runtime override — Use the
--api-keyCLI flag - Environment variable — Set
TARMIS_API_KEY
Get your API key from tarmis.ai.
Note: A key is only required to actually call a model. The model catalogue (
/v1/models) is public, so pi displays available Tarmis models and keeps them synced even before a key is configured.
Environment Variables
| Variable | Required | Description |
|----------|----------|-------------|
| TARMIS_API_KEY | No | Your Tarmis API key (fallback if not in auth.json; only needed to call a model) |
Configuration
Add to your pi configuration for automatic loading:
{
"extensions": [
"/path/to/pi-tarmis-provider"
]
}Usage
Once loaded, select a model with:
/model tarmis minimax/minimax-m3Or use /models to browse all available Tarmis models.
Reasoning Effort
For reasoning models, control thinking depth:
/reasoning highValues: none, low, medium, high, max
API Compatibility
Tarmis provides an OpenAI-compatible API. Key notes:
| Aspect | Behavior |
|--------|----------|
| Endpoint | https://api.tarmis.ai/v1/chat/completions |
| Max tokens field | Both max_tokens and max_completion_tokens accepted |
| Thinking format | openai (reasoning_content in response, reasoning_effort in request) |
| Developer role | Not assumed (developer messages are converted to system) |
| Reasoning effort | Accepted by reasoning models |
| /v1/models | Public (no auth) — returns pricing, context, modalities, and features |
| Prompt caching | Cached input billed at a cheaper input_cache_read rate when the API exposes one |
Reasoning compat: The Tarmis
/v1/modelsendpoint reports which models support reasoning, but not the wire format each model expects. Reasoning models are given the standard OpenAI-compatible defaults (thinkingFormat: "openai",supportsReasoningEffort: true,supportsDeveloperRole: false). If a model on Tarmis needs a different format (for example DeepSeek's nativethinkingfield), override it inpatch.json— see AGENTS.md.
API Documentation
- Tarmis Docs: https://docs.tarmis.ai
- OpenAI-compatible endpoint:
https://api.tarmis.ai/v1 - Models endpoint (public):
https://api.tarmis.ai/v1/models - Pricing: https://docs.tarmis.ai/docs/pricing
Updating Models
Run the update script to fetch the latest models from Tarmis's API:
node scripts/update-models.jsThe /v1/models endpoint is public, so no API key is required. This will:
- Fetch models from
https://api.tarmis.ai/v1/models - Derive pricing, context windows, max output, vision, and reasoning support from the API metadata
- Apply overrides from
patch.json - Update
models.jsonand the README model table - Move delisted models into
deprecated-models.json(14-day grace period)
License
MIT
