[providers.fireworks]
display_name = "Fireworks AI"
adapter = "openai_compatible"
api_key_url = "https://app.fireworks.ai/settings/users/api-keys"
base_url = "https://api.fireworks.ai/inference/v1"
priority = 30
enabled = false

[providers.fireworks.auth]
credentials = ["env:FIREWORKS_API_KEY", "vault:FIREWORKS_API_KEY"]

# To enable Fireworks, add the following to ~/.fabro/settings.toml:
#
# [llm.providers.fireworks]
# enabled = true
#
# Then run `fabro provider login --provider fireworks` to store the API key,
# or set the FIREWORKS_API_KEY environment variable.
#
# api_id values use Fireworks account-scoped paths; dots in upstream model
# names become "p" (glm-5.2 -> glm-5p2). `GET /v1/models` only returns a
# featured subset of serverless models, so validate api_ids against
# /chat/completions, not the models list.
#
# Prompt caching is automatic prefix caching (no cache_control breakpoints);
# serverless responses report prompt_tokens_details.cached_tokens in the
# usage body. Costs below are from docs.fireworks.ai/serverless/pricing,
# verified 2026-08-04. Rows use standard-tier prices unless noted otherwise.

[providers.fireworks.models."kimi-k3"]
api_id = "accounts/fireworks/models/kimi-k3"
display_name = "Kimi K3"
family = "kimi-k3"
agent_profile = "kimi"

[providers.fireworks.models."kimi-k3".limits]
context_window = 1048576
max_output = 131072

[providers.fireworks.models."kimi-k3".features]
tools = true
vision = true
reasoning = true
reasoning_effort = "always_adaptive"
prompt_cache = true
sampling_params = false

[providers.fireworks.models."kimi-k3".controls]
reasoning_effort = ["low", "medium", "high"]

[providers.fireworks.models."kimi-k3".costs]
input_cost_per_mtok = 3.0
output_cost_per_mtok = 15.0
cache_input_cost_per_mtok = 0.3

# Fireworks exposes the Fast tier through a separate router model ID. Its
# published prices are 50% above the standard Kimi K3 rates.
[providers.fireworks.models."kimi-k3-fast"]
api_id = "accounts/fireworks/routers/kimi-k3-fast"
display_name = "Kimi K3 Fast"
family = "kimi-k3"
agent_profile = "kimi"

[providers.fireworks.models."kimi-k3-fast".limits]
context_window = 1048576
max_output = 131072

[providers.fireworks.models."kimi-k3-fast".features]
tools = true
vision = true
reasoning = true
reasoning_effort = "always_adaptive"
prompt_cache = true
sampling_params = false

[providers.fireworks.models."kimi-k3-fast".controls]
reasoning_effort = ["low", "medium", "high"]

[providers.fireworks.models."kimi-k3-fast".costs]
input_cost_per_mtok = 4.5
output_cost_per_mtok = 22.5
cache_input_cost_per_mtok = 0.45

[providers.fireworks.models."kimi-k2.7-code"]
api_id = "accounts/fireworks/models/kimi-k2p7-code"
display_name = "Kimi K2.7 Code"
family = "kimi-k2"
default = true

[providers.fireworks.models."kimi-k2.7-code".limits]
context_window = 262144
max_output = 32768

[providers.fireworks.models."kimi-k2.7-code".features]
tools = true
vision = true
reasoning = true
prompt_cache = true

[providers.fireworks.models."kimi-k2.7-code".costs]
input_cost_per_mtok = 0.95
output_cost_per_mtok = 4.0
cache_input_cost_per_mtok = 0.19

[providers.fireworks.models."kimi-k2.6"]
api_id = "accounts/fireworks/models/kimi-k2p6"
display_name = "Kimi K2.6"
family = "kimi-k2"

[providers.fireworks.models."kimi-k2.6".limits]
context_window = 262144
max_output = 16384

[providers.fireworks.models."kimi-k2.6".features]
tools = true
vision = false
reasoning = false
prompt_cache = true

[providers.fireworks.models."kimi-k2.6".costs]
input_cost_per_mtok = 0.95
output_cost_per_mtok = 4.0
cache_input_cost_per_mtok = 0.16

[providers.fireworks.models."deepseek-v4-pro"]
api_id = "accounts/fireworks/models/deepseek-v4-pro"
display_name = "DeepSeek V4 Pro"
family = "deepseek-v4"
agent_profile = "openai"

[providers.fireworks.models."deepseek-v4-pro".limits]
context_window = 1048576
max_output = 16384

[providers.fireworks.models."deepseek-v4-pro".features]
tools = true
vision = false
reasoning = true
reasoning_effort = "levels"
reasoning_by_default = true
prompt_cache = true
sampling_params = false

[providers.fireworks.models."deepseek-v4-pro".controls]
# Fireworks promotes low/medium to high and xhigh to max for DeepSeek V4.
reasoning_effort = ["high", "max"]

[providers.fireworks.models."deepseek-v4-pro".costs]
input_cost_per_mtok = 1.74
output_cost_per_mtok = 3.48
cache_input_cost_per_mtok = 0.145

[providers.fireworks.models."deepseek-v4-flash"]
api_id = "accounts/fireworks/models/deepseek-v4-flash"
display_name = "DeepSeek V4 Flash"
family = "deepseek-v4"
aliases = ["deepseek-v4", "deepseek", "deepseek-flash"]
agent_profile = "openai"

[providers.fireworks.models."deepseek-v4-flash".limits]
context_window = 1048576
max_output = 384000

[providers.fireworks.models."deepseek-v4-flash".features]
tools = true
vision = false
reasoning = true
reasoning_effort = "levels"
reasoning_by_default = true
prompt_cache = true
sampling_params = false

[providers.fireworks.models."deepseek-v4-flash".controls]
reasoning_effort = ["high", "max"]

[providers.fireworks.models."deepseek-v4-flash".costs]
input_cost_per_mtok = 0.14
output_cost_per_mtok = 0.28
cache_input_cost_per_mtok = 0.028

[providers.fireworks.models."glm-5.2"]
api_id = "accounts/fireworks/models/glm-5p2"
display_name = "GLM 5.2 (via Fireworks)"
family = "glm-5"

[providers.fireworks.models."glm-5.2".limits]
context_window = 1048576
max_output = 131072

[providers.fireworks.models."glm-5.2".features]
tools = true
vision = false
reasoning = true
prompt_cache = true

[providers.fireworks.models."glm-5.2".costs]
input_cost_per_mtok = 1.4
output_cost_per_mtok = 4.4
cache_input_cost_per_mtok = 0.14

[providers.fireworks.models."minimax-m2.7"]
api_id = "accounts/fireworks/models/minimax-m2p7"
display_name = "MiniMax M2.7"
family = "minimax-m2"

[providers.fireworks.models."minimax-m2.7".limits]
context_window = 196608
max_output = 16384

[providers.fireworks.models."minimax-m2.7".features]
tools = true
vision = false
reasoning = false
prompt_cache = true

[providers.fireworks.models."minimax-m2.7".costs]
input_cost_per_mtok = 0.3
output_cost_per_mtok = 1.2
cache_input_cost_per_mtok = 0.059

[providers.fireworks.models."qwen3.7-plus"]
api_id = "accounts/fireworks/models/qwen3p7-plus"
display_name = "Qwen3.7 Plus"
family = "qwen3"

[providers.fireworks.models."qwen3.7-plus".limits]
context_window = 262144
max_output = 16384

[providers.fireworks.models."qwen3.7-plus".features]
tools = true
vision = true
reasoning = false
prompt_cache = true

[providers.fireworks.models."qwen3.7-plus".costs]
input_cost_per_mtok = 0.4
output_cost_per_mtok = 1.6
cache_input_cost_per_mtok = 0.08

[providers.fireworks.models."gpt-oss-120b"]
api_id = "accounts/fireworks/models/gpt-oss-120b"
display_name = "GPT-OSS 120B"
family = "gpt-oss"

[providers.fireworks.models."gpt-oss-120b".limits]
context_window = 131072
max_output = 32768

[providers.fireworks.models."gpt-oss-120b".features]
tools = true
vision = false
reasoning = true
prompt_cache = true

[providers.fireworks.models."gpt-oss-120b".costs]
input_cost_per_mtok = 0.15
output_cost_per_mtok = 0.6
cache_input_cost_per_mtok = 0.015

[providers.fireworks.models."gpt-oss-20b"]
api_id = "accounts/fireworks/models/gpt-oss-20b"
display_name = "GPT-OSS 20B"
family = "gpt-oss"
small_default = true
probe = true

[providers.fireworks.models."gpt-oss-20b".limits]
context_window = 131072
max_output = 32768

[providers.fireworks.models."gpt-oss-20b".features]
tools = true
vision = false
reasoning = true
prompt_cache = true

[providers.fireworks.models."gpt-oss-20b".costs]
input_cost_per_mtok = 0.07
output_cost_per_mtok = 0.3
cache_input_cost_per_mtok = 0.035
