Skip to main content
FireConnect routes Pi through Fireworks AI models. See the FireConnect overview for install and CLI basics.

Prerequisites

Enable Fireworks routing

Restart Pi after enabling if it is already running.

Using Fire Pass

Use your fpk_... key during login or with --api-key:
FireConnect detects Fire Pass keys and defaults Pi to glm-fast-latest.

Default model

Pi routes a single default model. The default is glm-fast-latest.

What gets written

FireConnect:
  • Sets defaultProvider / defaultModel in ~/.pi/agent/settings.json
  • Stores the API key in ~/.pi/agent/auth.json ($FIREWORKS_API_KEY when from env, literal with --api-key; never a literal in keychain mode)
  • Writes auth.json at mode 0600
FireConnect snapshots both files under ~/.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_KEY so the secret stays out of settings
  • Keychain mode installs a shell profile hook so Pi can read FIREWORKS_API_KEY at launch
  • Passing --api-key writes the literal key to auth.json instead

Browsing and picking models

Fire Pass keys (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:
You can switch among Anthropic models inside Pi without re-running FireConnect. FireConnect backs up 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

Run fireconnect pi help for all options.

Switch models

Turn off Fireworks routing

This restores your previous 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

One-off routing:

What gets written

FireConnect registers a fireworks-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:
To remove FireConnect entirely and restore your original settings.json, auth.json, and models.json:
Restart Pi after switching or running off. See Turn off Foundry routing for details on global config behavior and uninstall.

Source

FireConnect is open source: github.com/fw-ai/fireconnect