pi-aster-provider
v1.0.5
Published
Aster (asterlab.ai) provider extension for pi - Access Kimi K3, GLM 5.2, GPT-OSS, and batch models through the Aster API
Maintainers
Readme
✳️ pi-aster-provider
Kimi K3, GLM-5.2, GPT-OSS — via Aster
Coding-optimized open weights with lossless 1M context, for pi.
Features
- OpenAI-compatible API — Uses Aster's
/v1/chat/completionsendpoint - Coding-optimized models — Kimi K3 (1M context), GLM 5.2, GPT-OSS 120B, and more
- Reasoning models — All chat models think by default; control depth with
/reasoning - Tool use — Function calling works on every chat model (synbad-verified)
- Prompt caching — Discounted cached input on GLM and Kimi K3
- Batch variant —
zai-org/glm-5.2-batch, the discounted GLM 5.2 batch lane - Live model sync — Models refresh from the Aster API in the background
Available Models
| Model | ID | Context | Max Output | Vision | Reasoning | Cache | Input $/M | Output $/M |
|-------|----|---------|------------|--------|-----------|-------|-----------|------------|
| GLM 5.2 | glm-5.2 | 1.0M | 131K | ❌ | ✅ | ✅ | $1.00 | $4.00 |
| GLM 5.2 Batch | zai-org/glm-5.2-batch | 1.0M | 131K | ❌ | ✅ | ❌ | $0.75 | $2.50 |
| GPT OSS 120B | gpt-oss-120b | 131K | 33K | ❌ | ✅ | ❌ | $0.15 | $0.60 |
| GPT OSS 120B Fast | gpt-oss-120b-fast | 131K | 33K | ❌ | ✅ | ❌ | $0.15 | $0.60 |
| Kimi K3 | kimi-k3 | 1.0M | 131K | ❌ | ✅ | ✅ | $2.50 | $12.50 |
Costs are per million tokens.
Non-chat endpoints (e.g. aster/wildflower, per-call search pricing) are intentionally excluded.
Installation
Option 1: Using pi install (Recommended)
Install from npm:
pi install npm:pi-aster-providerOr install directly from GitHub:
pi install https://github.com/monotykamary/pi-aster-providerOption 2: With npm
Install from npm:
npm install pi-aster-providerOption 3: Manual Clone
Clone this repository:
git clone [email protected]:monotykamary/pi-aster-provider.git cd pi-aster-providerSet your Aster API key:
# Recommended: add to auth.json # See Authentication section below # Or set as environment variable export ASTER_API_KEY=your-api-key-hereRun pi with the extension:
pi -e /path/to/pi-aster-provider
Then authenticate and run pi:
# Recommended: add to auth.json
# See Authentication section below
# Or set as environment variable
export ASTER_API_KEY=your-api-key-here
piGet your API key from asterlab.ai.
Authentication
The Aster API key can be configured in multiple ways (resolved in this order):
auth.json(recommended) — Add to~/.pi/agent/auth.json:
The{ "aster": { "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
ASTER_API_KEY
Get your API key from asterlab.ai.
Environment Variables
| Variable | Required | Description |
|----------|----------|-------------|
| ASTER_API_KEY | No | Your Aster API key (fallback if not in auth.json) |
Configuration
Add to your pi configuration for automatic loading:
{
"extensions": [
"/path/to/pi-aster-provider"
]
}Usage
Once loaded, select a model with:
/model aster kimi-k3Or use /models to browse all available Aster models.
Reasoning Effort
All Aster chat models are reasoning models (thinking is on by default). Control thinking depth:
/reasoning highLevels are model-dependent (off … max); pi clamps to the nearest level each model supports and the extension
passes the mapped value through as the reasoning_effort request field. Support matrix (probed against Aster):
- gpt-oss-120b / -fast:
lowmediumhigh— canonically fixed at three levels; thinking cannot be disabled (noneis accepted but the model still reasons), andminimal/xhigh/maxare rejected with HTTP 400. - glm-5.2 / glm-5.2-batch:
offmaps tonone(disables thinking),low,medium,high,max.minimalandxhighare rejected (Z.AI canonical semantics maplow/mediumontohighbehavior). - kimi-k3:
low,high,max(Moonshot canonical — K3 defaults to max thinking and thinking stays on).
API Compatibility Notes
- Reasoning streams as the
reasoning_contentfield (DeepSeek-style), which pi parses natively. - Both
max_tokensandmax_completion_tokensare honored; the extension sendsmax_completion_tokens. - GPT-OSS models strictly validate
prompt + max_completion_tokens ≤ context(131K), so their curated max output is held to 32K; GLM 5.2 and Kimi K3 accept up to 128K completion tokens. - Image input is not supported by Aster's chat models (text-only).
- gpt-oss-120b (and -fast): Aster's DFLASH speculative decoding rejects grammar-constrained requests —
any tool schema sent with
strict: truefails with HTTP 400. This extension setssupportsStrictMode: falseso pi omits thestrictfield for these models. Also note the model does not reliably emit parallel tool calls in a single response (it serializes them); sequential tool calling works fine. - Kimi K3 keeps thinking on at all times (Moonshot canonical);
low/high/maxmap through,maxis the model's natural default.
Inference Quality
Verified with synbad (--count 1, plain and --stream):
| Model | Non-stream | Stream | |-------|-----------|--------| | GLM 5.2 | ✅ 15/15 | ✅ 15/15 | | GLM 5.2 Batch | ✅ 15/15 | — | | Kimi K3 | ✅ 15/15 | ✅ 15/15 | | GPT OSS 120B | ⚠️ 12/15 | ⚠️ 11/15 |
All reasoning evals (parsing + multi-turn reasoning preservation) pass on every model. The gpt-oss misses are
Aster-side serving quirks — grammar-constrained (strict) tool schemas 400 (mitigated here via
supportsStrictMode: false) and serialized parallel calls — not reasoning or history bugs.
Updating Models
To refresh the model list from the Aster API:
npm run update-modelsThis fetches from /v1/models, updates models.json, and regenerates this README. Idempotent — safe to run repeatedly.
API Documentation
- Aster: https://asterlab.ai
- OpenAI-compatible endpoint:
https://api.asterlab.ai/v1 - Models endpoint:
https://api.asterlab.ai/v1/models
License
MIT
