# Fireworks Inference

Run inference on Fireworks AI, direct, through the Leanmcp AI Gateway proxy...

- Repository: https://github.com/Leanmcp/gateway-skills (2122 stars)
- Category: Testing
- License: MIT
- Last updated: 2026-10-07
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add Leanmcp/gateway-skills --skill fireworks-inference -g -a claude-code -y`
Codex: `npx skills add Leanmcp/gateway-skills --skill fireworks-inference -g -a codex -y`
Cursor: `npx skills add Leanmcp/gateway-skills --skill fireworks-inference -g -a cursor -y`
Gemini CLI: `npx skills add Leanmcp/gateway-skills --skill fireworks-inference -g -a gemini-cli -y`

## Description

Run inference on Fireworks AI, direct, through the Leanmcp AI Gateway proxy (aigateway.leanmcp.com) for observability, or via LiteLLM / the OpenAI SDK / raw HTTP. Covers the endpoint-and-key matrix for each route, serverless vs dedicated deployments and their cold starts, browsing and filtering the model catalogue, reasoning models that return content:null with the answer in reasoning_content, function calling, concurrency and load testing, and runner scripts where many models share one protocol with a --use-proxy toggle. Use this skill whenever the user mentions Fireworks, FIREWORKS_API_KEY, api.fireworks.ai, fireworks_ai/ model ids, accounts/fireworks/models/..., a Fireworks deployment id, the Leanmcp gateway or LEANMCP_API_KEY, app.leanmcp.com observability, or gpt-oss / kimi / glm / qwen / deepseek served on Fireworks; wants to route LLM calls through a proxy for logging or cost tracking; is debugging empty responses, 404s, scope errors, cold starts, or "the gateway isn't working"; wants to pick a Fireworks model with tool calling; or wants to sweep several models over one benchmark. Reach for it even on vague asks like "why is this model returning nothing" or "set up inference for these models" when Fireworks is in play.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Fireworks inference

Inference on Fireworks is three independent choices, and nearly every confusing
failure is one of them being wrong while you debug another:

```
   TRANSPORT                ROUTE                        MODEL
   ─────────                ─────                        ─────
   raw HTTP                 direct Fireworks             serverless
   openai SDK        ×      api.fireworks.ai        ×    accounts/fireworks/models/<slug>
   litellm                  Leanmcp gateway              dedicated deployment
                            aigateway.leanmcp.com        accounts/<acct>/deployments/<id>
```

This skill's job is to let you isolate them one at a time instead of guessing.

## The route matrix, memorize this

| | base URL | key |
| --- | --- | --- |
| **direct Fireworks** | `https://api.fireworks.ai/inference/v1` | `FIREWORKS_API_KEY` |
| **Leanmcp gateway** | `https://aigateway.leanmcp.com/v1/fireworks` | `LEANMCP_API_KEY` |

Same models, same request and response shape. **Only the endpoint and the key
change**, which is why routing should be a flag, never a code path. Note the
key swap: through the gateway you send your *Leanmcp* key; the gateway holds the
Fireworks credential.

Gateway keys at <https://app.leanmcp.com/api-keys> (top up credits first at
<https://app.leanmcp.com/billing>); every request then shows up at
<https://app.leanmcp.com/observability>.

## Start here

**Something is broken.** Climb the ladder in
[references/verification.md](references/verification.md), each rung isolates one
layer, so the first failure names the culprit.

```bash
python scripts/fw_smoke.py --model gpt-oss-20b            # raw + sdk + litellm, gateway
python scripts/fw_smoke.py --model gpt-oss-20b --direct   # same, direct
```

The rest: https://github.com/Leanmcp/gateway-skills/blob/HEAD/skills/fireworks-inference/SKILL.md
