Summary
Please add first-class support (or documented configuration) for running pi (@earendil-works/pi-coding-agent) against the Juspay LiteLLM gateway (https://grid.ai.juspay.net).
Background
opencode works against the gateway today via the @ai-sdk/openai-compatible provider, so running e.g. kimi-k3 needs only:
"litellm": {
"models": { "kimi-k3": { "name": "kimi-k3", "limit": { "context": 256000, "output": 32000 }, ... } },
"npm": "@ai-sdk/openai-compatible",
"options": { "apiKey": "{env:JUSPAY_API_KEY}", "baseURL": "https://grid.ai.juspay.net" }
}
pi has no litellm provider, but it does support arbitrary OpenAI-compatible endpoints via ~/.pi/agent/models.json, so the equivalent configuration is:
{
"providers": {
"litellm": {
"baseUrl": "https://grid.ai.juspay.net",
"api": "openai-completions",
"apiKey": "$JUSPAY_API_KEY",
"models": [
{
"id": "kimi-k3",
"name": "kimi-k3",
"reasoning": false,
"input": ["text", "image"],
"contextWindow": 256000,
"maxTokens": 32000
}
]
}
}
}
then:
pi --model litellm/kimi-k3
# or via nixpkgs:
nix run nixpkgs#pi-coding-agent -- --model litellm/kimi-k3
Request
- Document (or generate) the pi
models.json mapping for the gateway, the same way opencode config is already handled.
- Ideally keep the model IDs, context windows, and output limits in sync with the opencode config so the two agents agree on each model's limits.
Open questions / things worth verifying on the pi side
- Whether
grid.ai.juspay.net accepts pi's default developer role / reasoning_effort for reasoning models, or whether per-provider "compat": { "supportsDeveloperRole": false, "supportsReasoningEffort": false } is required.
- Whether
reasoning: true models map onto any gateway-supported thinking-level parameter, or whether reasoning must be left off.
This is analogous to #22 (Claude Code) and #70 (Codex) — filling in the pi story would round out the supported-agent matrix.
Summary
Please add first-class support (or documented configuration) for running pi (
@earendil-works/pi-coding-agent) against the Juspay LiteLLM gateway (https://grid.ai.juspay.net).Background
opencode works against the gateway today via the
@ai-sdk/openai-compatibleprovider, so running e.g.kimi-k3needs only:pi has no
litellmprovider, but it does support arbitrary OpenAI-compatible endpoints via~/.pi/agent/models.json, so the equivalent configuration is:{ "providers": { "litellm": { "baseUrl": "https://grid.ai.juspay.net", "api": "openai-completions", "apiKey": "$JUSPAY_API_KEY", "models": [ { "id": "kimi-k3", "name": "kimi-k3", "reasoning": false, "input": ["text", "image"], "contextWindow": 256000, "maxTokens": 32000 } ] } } }then:
pi --model litellm/kimi-k3 # or via nixpkgs: nix run nixpkgs#pi-coding-agent -- --model litellm/kimi-k3Request
models.jsonmapping for the gateway, the same way opencode config is already handled.Open questions / things worth verifying on the pi side
grid.ai.juspay.netaccepts pi's defaultdeveloperrole /reasoning_effortfor reasoning models, or whether per-provider"compat": { "supportsDeveloperRole": false, "supportsReasoningEffort": false }is required.reasoning: truemodels map onto any gateway-supported thinking-level parameter, or whether reasoning must be left off.This is analogous to #22 (Claude Code) and #70 (Codex) — filling in the pi story would round out the supported-agent matrix.