pi-provider-inco1.0.1
Inco AI provider for pi with live model discovery
Untested on omp
This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.
Reports 0
No reports yet.
Readme
pi-provider-inco
An independent Inco integration for pi 1.4+ that connects to the public Inco AI service at api.inco.ai with your own API key. This project is not affiliated with or endorsed by Inco AI.
Install
pi install npm:pi-provider-inco
For one invocation from a local checkout:
pi --no-extensions -e /path/to/pi-provider-inco
Requires Node.js 22.19 or newer. This integration targets pi 1.4+.
Authenticate
Create a key in the Inco AI dashboard. Run /login and choose Inco AI, or export INCO_API_KEY before starting pi. Pi owns the saved credential.
export INCO_API_KEY="your-key"
pi --model inco/deepseek-v4.1-flash:fast --thinking off -p "Reply with OK"
A .env file is a development convenience; the clients do not automatically load this repository's .env. Keep credentials out of project configuration, shell history, and bug reports.
Models
- Fetches the authenticated
GET https://api.inco.ai/v1/modelscatalog. A successful response replaces the previous list, including a successful empty list. - Preserves upstream IDs verbatim, including
:fast. Chat routes are selected underinco/<upstream-id>. - Uses live names, context windows, explicit image/tool capabilities, and prices in USD per million tokens. Missing output limits use a conservative 16,384-token request budget.
- Keeps public catalog metadata in
$PI_CODING_AGENT_DIR/cache/pi-provider-inco/(default~/.pi/agent/cache/pi-provider-inco/), scoped by a SHA-256 credential fingerprint. A different key cannot reuse another key's catalog. - Uses the matching persisted catalog during outages, then the bundled public snapshot on first use. HTTP 401/403 clears the matching catalog and lists no models.
Discovery completes before startup model selection, then uses pi's native provider refresh lifecycle. Run pi update --models to refresh explicitly; the provider respects offline mode.
The bundled snapshot and verified tool/reasoning profiles come from inco-copilot-chat. They cover ten routes: DeepSeek V4.1 Flash, GLM 5.3, GLM 5.3 Flash, Kimi K3, and MiniMax M3.1 Flash, each with a :fast variant. The current live catalog always wins.
Reasoning and tools
Pi maps off to Inco AI none. Unsupported thinking levels are null, so pi clamps to a supported level. The final request is validated against the current model catalog. Requests use reasoning_effort, and explicit live effort lists are never widened by bundled profiles.
| Route | Bundled accepted effort controls |
|---|---|
| DeepSeek V4.1 Flash, either route | none, minimal, low, medium, high, xhigh, max |
| Kimi K3 | none, low, high, max |
| Kimi K3 Fast | none, minimal, low, medium, high, xhigh, max |
| GLM 5.3 / GLM 5.3 Flash | low, high, max |
| GLM Fast routes / MiniMax Fast | minimal, low, medium, high, xhigh, max |
| MiniMax M3.1 Flash | none, minimal, low, medium, high, xhigh, max |
Positive effort spellings accepted by the service do not establish distinct reasoning depths. Fast GLM and MiniMax routes omit none because the Copilot bridge's probes did not establish that it stops reasoning. Unknown models keep the server default unless live metadata explicitly enumerates their efforts.
All ten bundled routes have verified structured tool support. Standard deepseek-v4.1-flash requires effort none for forced tool choice; automatic tools can use thinking. Invalid forced-tool combinations fail before sending. Use the Fast route for forced tools with thinking.
Transport and privacy
Uses pi's host-provided OpenAI Chat Completions transport for streaming, tool-call assembly, usage, cancellation, and inference retry behavior. The provider validates final effort/output settings and pins inference to https://api.inco.ai/v1/chat/completions. Catalog requests reject redirects and never include response bodies in errors.
The integration does not log keys, prompts, tool arguments, responses, or account data. The host client may store conversation history according to its own settings. Inco AI controls retention, relay access, and billing; review your dashboard settings. Costs are estimates and the Inco AI dashboard is authoritative. Where the host requires numeric rates, unavailable price fields display as zero estimates, not a promise of free service.
Development
npm ci
npm run check
npm run package
Tests use injected network fakes, including a packed-package inference check in bundled pi without locally installed SDK peers. Real inference checks are opt-in and incur service usage. The check uses temporary client configuration, data, cache and session directories, disables unrelated integrations, and prints only verification metadata:
node --env-file=/path/to/.env scripts/verify-live.mjs
node --env-file=/path/to/.env scripts/verify-live.mjs --tui
node --env-file=/path/to/.env scripts/verify-live.mjs --saved-key --tui
INCO_VERIFY_MODEL=glm-5.3-flash INCO_VERIFY_THINKING=high node --env-file=/path/to/.env scripts/verify-live.mjs --saved-key --tui
The TUI checks run the real interactive client in an isolated tmux server. --saved-key verifies pi's native credential store using a temporary auth.json, with INCO_API_KEY removed from the client environment. Set INCO_CLIENT_BIN when the client is outside PATH, or INCO_VERIFY_SOURCE to test an extracted npm package. Temporary client state is removed afterward. See verification.md for the isolated run evidence.
See CONTRIBUTING.md, RELEASING.md, and SECURITY.md.