Prerequisites
- Pi installed
- A Fireworks API key (
fw_...) or a Fire Pass key (fpk_...) - The FireConnect CLI (see Install)
Enable Fireworks routing
Using Fire Pass
Use yourfpk_... key during login or with --api-key:
glm-fast-latest.
Default model
Pi routes a single default model. The default isglm-fast-latest.
What gets written
FireConnect:- Sets
defaultProvider/defaultModelin~/.pi/agent/settings.json - Stores the API key in
~/.pi/agent/auth.json($FIREWORKS_API_KEYwhen from env, literal with--api-key; never a literal in keychain mode) - Writes
auth.jsonat mode0600
~/.fireconnect/pi/ before the first change. Running fireconnect pi off restores them byte-for-byte.
API key handling
- If the key comes from the OS keychain, it is written as
$FIREWORKS_API_KEYso the secret stays out of settings - Keychain mode installs a shell profile hook so Pi can read
FIREWORKS_API_KEYat launch - Passing
--api-keywrites the literal key toauth.jsoninstead
Browsing and picking models
fpk_...) show Fire Pass-supported routers only.
FireRouter mode
fireconnect pi on --router overrides Pi’s built-in Anthropic provider so its existing Claude model catalog is sent through https://router.fireworks.ai/v1. The Fireworks key is supplied through X-FireRouter-Fireworks-Key; an Anthropic API key is also required:
settings.json, auth.json, and models.json, and fireconnect pi off restores all three byte-for-byte. model select and model reset do not apply in router mode.
In router mode, Pi’s
/model picker still shows Anthropic’s built-in model names (for example, Claude Sonnet 4.5). The selected name is passed through FireRouter, but the display label is Pi’s own — it does not reflect the Fireworks model actually serving the request behind the router. Use fireconnect pi status to see the underlying routing.CLI reference
fireconnect pi help for all options.
Switch models
Turn off Fireworks routing
settings.json and auth.json from the backup in ~/.fireconnect/pi/.
Use a non-default settings file
Fireworks on Microsoft Foundry
Pi supports Fireworks on Microsoft Foundry (CLI:--provider azure or on --azure). See the FireConnect overview and Microsoft Foundry integration guide for portal setup.
Configure and enable
What gets written
FireConnect registers afireworks-azure openai-completions provider in Pi’s models.json (labeled Fireworks on Microsoft Foundry) and sets defaultProvider / defaultModel in settings.json. The Azure API key is stored in auth.json as $AZURE_API_KEY when from the environment, or literally with --api-key.
Pass your Foundry deployment name with --main. model list and model select browse the Fireworks serverless catalog only.
Turn off Foundry routing
To switch back to the Fireworks gateway:settings.json, auth.json, and models.json:
off. See Turn off Foundry routing for details on global config behavior and uninstall.