Skip to main content
FireConnect routes Claude Code through Fireworks AI models. Install it once, then use fireconnect on and fireconnect off to switch providers without editing config files by hand.

Prerequisites

Install

curl -fsSL https://raw.githubusercontent.com/fw-ai/fireconnect/main/install.sh | bash
For non-interactive setup (CI or scripted installs):
curl -fsSL https://raw.githubusercontent.com/fw-ai/fireconnect/main/install.sh | FIREWORKS_API_KEY="fw_..." bash
The installer:
  • Uses Node.js to update Claude Code settings (it does not install or update npm packages)
  • Prompts for your Fireworks API key, or reads it from FIREWORKS_API_KEY
  • Runs fireconnect on to apply the default model mapping and write ~/.claude/settings.json
  • Clones the FireConnect CLI to ~/.fireconnect/cli and installs a fireconnect launcher to ~/.local/bin
  • Adds ~/.local/bin to your shell PATH
Restart Claude Code after installation, then test with:
Is this thing on?

Using Fire Pass

If you have a Fire Pass subscription, use your fpk_... key instead:
curl -fsSL https://raw.githubusercontent.com/fw-ai/fireconnect/main/install.sh | FIREWORKS_API_KEY="fpk_..." bash
FireConnect automatically detects Fire Pass keys and routes all model aliases to kimi-k2p6-turbo — the only model covered by the Fire Pass subscription.

Default model mapping

AliasStandard key (fw_...)Fire Pass key (fpk_...)
mainkimi-k2p6-turbokimi-k2p6-turbo
opuskimi-k2p6-turbokimi-k2p6-turbo
sonnetglm-5p1kimi-k2p6-turbo
haikuminimax-m2p5kimi-k2p6-turbo
subagentminimax-m2p5kimi-k2p6-turbo
Short model IDs like kimi-k2p6-turbo are expanded to full Fireworks paths (for example, accounts/fireworks/routers/kimi-k2p6-turbo).

What gets written

FireConnect writes these settings to ~/.claude/settings.json:
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.fireworks.ai/inference",
    "ANTHROPIC_API_KEY": "fw_YOUR_FIREWORKS_API_KEY",
    "ANTHROPIC_AUTH_TOKEN": "fw_YOUR_FIREWORKS_API_KEY",
    "ANTHROPIC_MODEL": "accounts/fireworks/routers/kimi-k2p6-turbo",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "accounts/fireworks/routers/kimi-k2p6-turbo",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "accounts/fireworks/models/glm-5p1",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "accounts/fireworks/models/minimax-m2p5",
    "CLAUDE_CODE_SUBAGENT_MODEL": "accounts/fireworks/models/minimax-m2p5"
  }
}
FireConnect writes both ANTHROPIC_API_KEY (preferred) and ANTHROPIC_AUTH_TOKEN (compatibility alias) with the same Fireworks key. It also saves a backup of your previous provider settings to ~/.fireconnect/claude/ so fireconnect off can restore them.

CLI reference

fireconnect on         # Route Claude Code through Fireworks
fireconnect off        # Restore your previous provider
fireconnect status     # Show the current provider and model
fireconnect list       # Show the default and current model mapping
fireconnect set        # Change model aliases without touching credentials
fireconnect reset      # Reset model aliases to defaults
fireconnect uninstall  # Remove FireConnect from this machine
Run fireconnect help <command> for all options.

Manual setup

If you already have a Fireworks API key, you can skip the installer and enable routing directly:
fireconnect on --api-key fw_...
Restart Claude Code after this completes.

Switch models

Short model IDs work everywhere:
fireconnect set --main kimi-k2p6-turbo --sonnet glm-5p1 --haiku minimax-m2p5 --subagent minimax-m2p5

Turn off Fireworks routing

fireconnect off
This restores your previous ~/.claude/settings.json from the backup saved in ~/.fireconnect/claude/.

Enable with a specific API key

fireconnect on --api-key fw_...

Uninstall

fireconnect uninstall
This disables Fireworks routing for Claude Code, removes ~/.fireconnect/claude/, and deletes the fireconnect CLI launcher from ~/.local/bin.

Source

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