@vtstech/pi-api
v1.2.0
Published
API Mode Switcher extension for Pi Coding Agent
Downloads
2,226
Readme
@vtstech/pi-api
API Mode Switcher extension for the Pi Coding Agent.
Runtime switching of API modes, base URLs, thinking settings, and compat flags in models.json. Supports all 10 Pi API modes.
Install
pi install "npm:@vtstech/pi-api"Commands
/api Show current provider config (mode, URL, compat flags)
/api mode <mode> Switch API mode (partial match supported)
/api url <url> Switch base URL
/api think on|off|auto Toggle thinking for all models in provider
/api compat <key> View compat flags
/api compat <key> <val> Set compat flag
/api modes List all 10 supported API modes
/api providers List all configured providers
/api reload Hint to run /reloadSupported API Modes
anthropic-messages · openai-completions · openai-responses · azure-openai-responses · openai-codex-responses · mistral-conversations · google-generative-ai · google-gemini-cli · google-vertex · bedrock-converse-stream
Features
- Partial mode matching —
/api mode openai-rmatchesopenai-responses - Auto-detect local provider — targets the first
localhost/ollamaprovider by default - Batch thinking toggle — set
reasoning: true/falseacross all models at once - Compat flag management — get/set
supportsDeveloperRole,thinkingFormat,maxTokensField, etc. - Tab-completion for sub-commands
Links
License
MIT — VTSTech
