Skip to main content
FireConnect routes Claude Code through Fireworks AI models. See the FireConnect overview for install and CLI basics.
Change models: fireconnect claude on --model <id> (or --opus / --sonnet / …). See Models.

Prerequisites

Azure routing not implemented yet for Claude Code. fireconnect claude on always configures direct Fireworks, even when global config has --provider azure or you pass --azure. See Microsoft Foundry in FireConnect.

Enable Fireworks routing

Or pass the key once:
Restart Claude Code after enabling, then test with a simple prompt. After fireconnect claude on, start a new Claude Code session or run /model to pick up model changes. To use a new model in the same session, start a new session or /exit and resume with claude --resume <id>.

Change models

Slot flags are independent — --opus firerouter changes only Opus and leaves main alone. Use native as a slot value to leave it unpinned so Claude Code picks Anthropic’s default for that role (still routed through Fireworks). Re-running on without flags preserves your current mapping when FireConnect is already active (including /model changes made inside Claude Code).

Example model mapping

When you run fireconnect claude on without model flags, FireConnect applies the mapping below. First-time setup opens an interactive picker unless you pass --non-interactive. Override any slot with --model, --opus, --sonnet, --haiku, --fable, or --subagent. On first connect with a standard key and FireRouter auth available, Opus is auto-pinned to firerouter and Sonnet moves to glm-latest. Reopen the wizard anytime:
Use --non-interactive to skip the wizard and apply saved preferences or defaults. --interactive cannot be combined with model flags like --model or --opus. The wizard is Fable-first and shows every slot on one screen. Pick a model per slot — no separate fast/non-fast profile toggle.

Smart router mixes

Pin Fireworks’ open-model mixes on any slot:
auto appears on every slot in the picker; auto-instant is available on Sonnet. These route among Fireworks open models only — unlike FireRouter, they do not pass through to Claude Opus 5.

What gets written

FireConnect writes these settings to ~/.claude/settings.json. Claude Code authenticates via the X-Fireworks-Api-Key custom header (not apiKeyHelper). The Fireworks key is written to the file with mode 0600. Example settings after first connect with a standard key:
Why the custom header? The gateway authenticates via X-Fireworks-Api-Key, which wins over any stray ANTHROPIC_API_KEY / ANTHROPIC_AUTH_TOKEN — so a leftover Anthropic key can’t silently break routing. Model IDs and [1m]. Short slugs are accepted everywhere. FireConnect adds a [1m] suffix on 1M-context models for every slot — subagent included — so Claude Code sizes the context window correctly. The gateway still sees the bare model ID; Claude Code strips the tag before sending. on also:
  • Denies Anthropic server-side WebSearch / WebFetch tools the gateway can’t run, and installs the Fireworks WebSearch MCP when your account is eligible
  • Installs a status line showing routed models and Fireworks-rate session cost (see Status line). Your own statusLine is never replaced
  • Sends privacy-safe attribution headers (X-Title, HTTP-Referer) where supported
FireConnect saves a backup of your previous provider settings to ~/.fireconnect/claude/ so fireconnect claude off can restore them byte-for-byte. Legacy pins like deepseek-v4-flash migrate to deepseek-flash-latest on the next on.

Status line

When you don’t already have a custom statusLine, on installs one that shows which models actually served the session and what they cost at Fireworks rates:
The first line is a multi-color bar sized by each backend model’s share of session spend, followed by the session total. The second line names each model with its cost and cache hit rate. FireRouter sessions show the whole mix at a glance — not just the latest model. The cost uses the same pricing engine as fireconnect claude usage, not Claude Code’s Anthropic list-price estimate. A ~ prefix means some model had no published rate and fell back to a reference price. off removes the status line. If you already have a statusLine, FireConnect leaves it alone — delete yours and re-run fireconnect claude to opt in.

Web search MCP

When you run fireconnect claude on, FireConnect can install the Fireworks WebSearch MCP for eligible accounts. FireConnect WebSearch integration is Claude Code only today; other harnesses can add the HTTP MCP manually. When installation succeeds, fireconnect claude on prints Web search → fireworks-websearch (installed). Restart Claude Code, then run /mcp and connect to fireworks-websearch. fireconnect claude off removes the managed MCP entry and restores your previous ~/.claude/settings.json.

Browsing and picking models

fireconnect model list shows serverless endpoints and pricing (cached for one hour; works offline). fireconnect claude status shows your current mapping, every slot including defaults, and Fireworks rates per slot. Fire Pass keys only list Fire Pass routers. FireConnect rejects --model firerouter with Fire Pass (fpk_...) on every harness; use an fw_... key.

FireRouter

Route requests through FireRouter:
Use --model firerouter for main, or slot flags like --opus firerouter. Pass --anthropic-api-key sk-ant-... on on, or store it once with fireconnect configure --anthropic-api-key sk-ant-.... Bias savings vs quality with --routing-preference (1-5; default 3):
See Routing preferences.

Usage and live meter

Claude Code’s /model picker shows Anthropic list prices, not Fireworks rates. Use fireconnect claude usage to estimate real Fireworks spend from session logs. On a TTY, usage opens a session picker (last 3 days by default), then a live cost meter. Tab: agents pane. Esc: session list. q: quit.
For a tmux split (Claude Code left, meter right):
Requires tmux. Neither command changes harness settings. Scripting:

Troubleshooting

Text-only models and images

Claude Code cannot mark a model as non-vision. Pasting an image on a text-only slot (for example glm-fast-latest or deepseek-flash-latest) can break the session. Recover with /rewind, then avoid images on that slot or map it to a vision model:
fireconnect claude on warns when your mapping includes text-only models. fireconnect claude status labels each slot vision or text-only.

Pricing estimates

Claude Code’s session cost uses Anthropic list prices, while Fireworks bills at serverless rates. Use fireconnect claude status, fireconnect model list, and the billing dashboard for actual spend.

CLI reference

Run fireconnect claude help for all options.

Turn off Fireworks routing

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

Uninstall

To remove FireConnect from your machine entirely (all harnesses):

Source

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