fix(cost-map): add rows for every Fireworks -latest router alias so tool_choice and reasoning_effort pass through
Some checks failed
Cost map pins recheck / rerun-cost-map-guard (push) Has been cancelled
LiteLLM Rust DB / db-queries (push) Has been cancelled
LiteLLM Rust / rust-lint (push) Has been cancelled
LiteLLM Rust / rust-test (push) Has been cancelled
LiteLLM Rust / rust-wheel (push) Has been cancelled

Fireworks serves minimax-latest, kimi-latest, kimi-fast-latest, qwen-max-latest, glm-latest,
glm-fast-latest, glm-flash-latest and deepseek-flash-latest as router aliases of a model or fast
router that already has a cost-map row. Without a row of their own, get_supported_openai_params
dropped tool_choice and reasoning_effort for them and the request failed with
UnsupportedParamsError. Each alias row copies its target row, with the source pointing at
the serverless models listing.

glm-flash-latest also carries supports_reasoning, because its target only gets reasoning
params from the fuzzy glm-5p3 match and Fireworks answers GLM 5.3 Flash as a thinking-only
model. deepseek-flash-latest is re-synced to its target, which dropped the retired max_tokens.
This commit is contained in:
mateo-berri 2026-10-29 07:07:00 -07:00
parent f1c9c4e8c4
commit c60430beaa
3 changed files with 282 additions and 2 deletions

View file

@ -28073,6 +28073,24 @@
"supports_tool_choice": true,
"supports_vision": true
},
"fireworks_ai/accounts/fireworks/routers/minimax-latest": {
"cache_read_input_token_cost": 6e-08,
"cache_read_input_token_cost_priority": 9e-08,
"input_cost_per_token": 3e-07,
"input_cost_per_token_priority": 4.5e-07,
"litellm_provider": "fireworks_ai",
"max_input_tokens": 512000,
"max_output_tokens": 512000,
"mode": "chat",
"output_cost_per_token": 1.2e-06,
"output_cost_per_token_priority": 1.8e-06,
"source": "https://api.fireworks.ai/v1/serverless/models?format=nested",
"supports_function_calling": true,
"supports_reasoning": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": true
},
"fireworks_ai/accounts/fireworks/models/mixtral-8x22b-instruct-hf": {
"input_cost_per_token": 1.2e-06,
"litellm_provider": "fireworks_ai",
@ -63470,6 +63488,29 @@
"supports_tool_choice": true,
"supports_vision": true
},
"fireworks_ai/accounts/fireworks/routers/kimi-latest": {
"cache_read_input_token_cost": 3e-07,
"cache_read_input_token_cost_priority": 3.75e-07,
"input_cost_per_token": 3e-06,
"input_cost_per_token_priority": 3.75e-06,
"litellm_provider": "fireworks_ai",
"max_input_tokens": 1048576,
"max_output_tokens": 131072,
"mode": "chat",
"output_cost_per_token": 1.5e-05,
"output_cost_per_token_priority": 1.875e-05,
"reasoning_effort_levels": [
"low",
"high",
"max"
],
"source": "https://api.fireworks.ai/v1/serverless/models?format=nested",
"supports_function_calling": true,
"supports_reasoning": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": true
},
"fireworks_ai/deepseek-v4-flash-0731": {
"cache_read_input_token_cost": 7e-09,
"cache_read_input_token_cost_priority": 8.75e-09,
@ -63809,6 +63850,24 @@
"supports_tool_choice": true,
"supports_vision": true
},
"fireworks_ai/accounts/fireworks/routers/qwen-max-latest": {
"cache_read_input_token_cost": 2.5e-07,
"cache_read_input_token_cost_priority": 3.75e-07,
"input_cost_per_token": 2e-06,
"input_cost_per_token_priority": 3e-06,
"litellm_provider": "fireworks_ai",
"max_input_tokens": 262144,
"mode": "chat",
"output_cost_per_token": 6e-06,
"output_cost_per_token_priority": 9e-06,
"source": "https://api.fireworks.ai/v1/serverless/models?format=nested",
"supports_function_calling": true,
"supports_mid_conversation_system": false,
"supports_reasoning": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": true
},
"fireworks_ai/accounts/fireworks/routers/glm-5p2-fast": {
"cache_read_input_token_cost": 2.1e-07,
"deprecation_date": "2026-09-25",
@ -63861,6 +63920,26 @@
"supports_tool_choice": true,
"supports_vision": true
},
"fireworks_ai/accounts/fireworks/routers/kimi-fast-latest": {
"cache_read_input_token_cost": 4.5e-07,
"input_cost_per_token": 4.5e-06,
"litellm_provider": "fireworks_ai",
"max_input_tokens": 1048576,
"max_output_tokens": 131072,
"mode": "chat",
"output_cost_per_token": 2.25e-05,
"reasoning_effort_levels": [
"low",
"high",
"max"
],
"source": "https://api.fireworks.ai/v1/serverless/models?format=nested",
"supports_function_calling": true,
"supports_reasoning": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": true
},
"fireworks_ai/accounts/fireworks/routers/kimi-k3-us": {
"cache_read_input_token_cost": 4.5e-07,
"cache_read_input_token_cost_priority": 5.625e-07,
@ -66677,6 +66756,24 @@
"supports_tool_choice": true,
"supports_vision": false
},
"fireworks_ai/accounts/fireworks/routers/glm-latest": {
"cache_read_input_token_cost": 2.6e-07,
"cache_read_input_token_cost_priority": 3.25e-07,
"input_cost_per_token": 1.4e-06,
"input_cost_per_token_priority": 1.75e-06,
"litellm_provider": "fireworks_ai",
"max_input_tokens": 1048576,
"max_output_tokens": 128000,
"mode": "chat",
"output_cost_per_token": 4.4e-06,
"output_cost_per_token_priority": 5.5e-06,
"source": "https://api.fireworks.ai/v1/serverless/models?format=nested",
"supports_function_calling": true,
"supports_reasoning": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": false
},
"fireworks_ai/accounts/fireworks/routers/glm-5p3-us": {
"cache_read_input_token_cost": 3.9e-07,
"cache_read_input_token_cost_priority": 4.875e-07,
@ -66746,6 +66843,21 @@
"supports_tool_choice": true,
"supports_vision": false
},
"fireworks_ai/accounts/fireworks/routers/glm-fast-latest": {
"cache_read_input_token_cost": 3.9e-07,
"input_cost_per_token": 2.1e-06,
"litellm_provider": "fireworks_ai",
"max_input_tokens": 1048576,
"max_output_tokens": 1048576,
"mode": "chat",
"output_cost_per_token": 6.6e-06,
"source": "https://api.fireworks.ai/v1/serverless/models?format=nested",
"supports_function_calling": true,
"supports_reasoning": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": false
},
"fireworks_ai/accounts/fireworks/routers/auto": {
"litellm_provider": "fireworks_ai",
"mode": "chat",
@ -66805,6 +66917,24 @@
"supports_tool_choice": true,
"supports_vision": true
},
"fireworks_ai/accounts/fireworks/routers/glm-flash-latest": {
"cache_read_input_token_cost": 3e-08,
"cache_read_input_token_cost_priority": 3.75e-08,
"input_cost_per_token": 1.5e-07,
"input_cost_per_token_priority": 1.875e-07,
"litellm_provider": "fireworks_ai",
"max_input_tokens": 1048576,
"max_output_tokens": 1048576,
"mode": "chat",
"output_cost_per_token": 5e-07,
"output_cost_per_token_priority": 6.25e-07,
"source": "https://api.fireworks.ai/v1/serverless/models?format=nested",
"supports_function_calling": true,
"supports_reasoning": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": true
},
"fireworks_ai/accounts/fireworks/routers/glm-5p3-flash-us": {
"cache_read_input_token_cost": 4.5e-08,
"cache_read_input_token_cost_priority": 5.625e-08,
@ -76540,7 +76670,6 @@
"litellm_provider": "fireworks_ai",
"max_input_tokens": 1048576,
"max_output_tokens": 393216,
"max_tokens": 393216,
"mode": "chat",
"output_cost_per_token": 1.2e-06,
"output_cost_per_token_priority": 1.5e-06,

View file

@ -28073,6 +28073,24 @@
"supports_tool_choice": true,
"supports_vision": true
},
"fireworks_ai/accounts/fireworks/routers/minimax-latest": {
"cache_read_input_token_cost": 6e-08,
"cache_read_input_token_cost_priority": 9e-08,
"input_cost_per_token": 3e-07,
"input_cost_per_token_priority": 4.5e-07,
"litellm_provider": "fireworks_ai",
"max_input_tokens": 512000,
"max_output_tokens": 512000,
"mode": "chat",
"output_cost_per_token": 1.2e-06,
"output_cost_per_token_priority": 1.8e-06,
"source": "https://api.fireworks.ai/v1/serverless/models?format=nested",
"supports_function_calling": true,
"supports_reasoning": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": true
},
"fireworks_ai/accounts/fireworks/models/mixtral-8x22b-instruct-hf": {
"input_cost_per_token": 1.2e-06,
"litellm_provider": "fireworks_ai",
@ -63470,6 +63488,29 @@
"supports_tool_choice": true,
"supports_vision": true
},
"fireworks_ai/accounts/fireworks/routers/kimi-latest": {
"cache_read_input_token_cost": 3e-07,
"cache_read_input_token_cost_priority": 3.75e-07,
"input_cost_per_token": 3e-06,
"input_cost_per_token_priority": 3.75e-06,
"litellm_provider": "fireworks_ai",
"max_input_tokens": 1048576,
"max_output_tokens": 131072,
"mode": "chat",
"output_cost_per_token": 1.5e-05,
"output_cost_per_token_priority": 1.875e-05,
"reasoning_effort_levels": [
"low",
"high",
"max"
],
"source": "https://api.fireworks.ai/v1/serverless/models?format=nested",
"supports_function_calling": true,
"supports_reasoning": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": true
},
"fireworks_ai/deepseek-v4-flash-0731": {
"cache_read_input_token_cost": 7e-09,
"cache_read_input_token_cost_priority": 8.75e-09,
@ -63809,6 +63850,24 @@
"supports_tool_choice": true,
"supports_vision": true
},
"fireworks_ai/accounts/fireworks/routers/qwen-max-latest": {
"cache_read_input_token_cost": 2.5e-07,
"cache_read_input_token_cost_priority": 3.75e-07,
"input_cost_per_token": 2e-06,
"input_cost_per_token_priority": 3e-06,
"litellm_provider": "fireworks_ai",
"max_input_tokens": 262144,
"mode": "chat",
"output_cost_per_token": 6e-06,
"output_cost_per_token_priority": 9e-06,
"source": "https://api.fireworks.ai/v1/serverless/models?format=nested",
"supports_function_calling": true,
"supports_mid_conversation_system": false,
"supports_reasoning": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": true
},
"fireworks_ai/accounts/fireworks/routers/glm-5p2-fast": {
"cache_read_input_token_cost": 2.1e-07,
"deprecation_date": "2026-09-25",
@ -63861,6 +63920,26 @@
"supports_tool_choice": true,
"supports_vision": true
},
"fireworks_ai/accounts/fireworks/routers/kimi-fast-latest": {
"cache_read_input_token_cost": 4.5e-07,
"input_cost_per_token": 4.5e-06,
"litellm_provider": "fireworks_ai",
"max_input_tokens": 1048576,
"max_output_tokens": 131072,
"mode": "chat",
"output_cost_per_token": 2.25e-05,
"reasoning_effort_levels": [
"low",
"high",
"max"
],
"source": "https://api.fireworks.ai/v1/serverless/models?format=nested",
"supports_function_calling": true,
"supports_reasoning": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": true
},
"fireworks_ai/accounts/fireworks/routers/kimi-k3-us": {
"cache_read_input_token_cost": 4.5e-07,
"cache_read_input_token_cost_priority": 5.625e-07,
@ -66677,6 +66756,24 @@
"supports_tool_choice": true,
"supports_vision": false
},
"fireworks_ai/accounts/fireworks/routers/glm-latest": {
"cache_read_input_token_cost": 2.6e-07,
"cache_read_input_token_cost_priority": 3.25e-07,
"input_cost_per_token": 1.4e-06,
"input_cost_per_token_priority": 1.75e-06,
"litellm_provider": "fireworks_ai",
"max_input_tokens": 1048576,
"max_output_tokens": 128000,
"mode": "chat",
"output_cost_per_token": 4.4e-06,
"output_cost_per_token_priority": 5.5e-06,
"source": "https://api.fireworks.ai/v1/serverless/models?format=nested",
"supports_function_calling": true,
"supports_reasoning": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": false
},
"fireworks_ai/accounts/fireworks/routers/glm-5p3-us": {
"cache_read_input_token_cost": 3.9e-07,
"cache_read_input_token_cost_priority": 4.875e-07,
@ -66746,6 +66843,21 @@
"supports_tool_choice": true,
"supports_vision": false
},
"fireworks_ai/accounts/fireworks/routers/glm-fast-latest": {
"cache_read_input_token_cost": 3.9e-07,
"input_cost_per_token": 2.1e-06,
"litellm_provider": "fireworks_ai",
"max_input_tokens": 1048576,
"max_output_tokens": 1048576,
"mode": "chat",
"output_cost_per_token": 6.6e-06,
"source": "https://api.fireworks.ai/v1/serverless/models?format=nested",
"supports_function_calling": true,
"supports_reasoning": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": false
},
"fireworks_ai/accounts/fireworks/routers/auto": {
"litellm_provider": "fireworks_ai",
"mode": "chat",
@ -66805,6 +66917,24 @@
"supports_tool_choice": true,
"supports_vision": true
},
"fireworks_ai/accounts/fireworks/routers/glm-flash-latest": {
"cache_read_input_token_cost": 3e-08,
"cache_read_input_token_cost_priority": 3.75e-08,
"input_cost_per_token": 1.5e-07,
"input_cost_per_token_priority": 1.875e-07,
"litellm_provider": "fireworks_ai",
"max_input_tokens": 1048576,
"max_output_tokens": 1048576,
"mode": "chat",
"output_cost_per_token": 5e-07,
"output_cost_per_token_priority": 6.25e-07,
"source": "https://api.fireworks.ai/v1/serverless/models?format=nested",
"supports_function_calling": true,
"supports_reasoning": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": true
},
"fireworks_ai/accounts/fireworks/routers/glm-5p3-flash-us": {
"cache_read_input_token_cost": 4.5e-08,
"cache_read_input_token_cost_priority": 5.625e-08,
@ -76540,7 +76670,6 @@
"litellm_provider": "fireworks_ai",
"max_input_tokens": 1048576,
"max_output_tokens": 393216,
"max_tokens": 393216,
"mode": "chat",
"output_cost_per_token": 1.2e-06,
"output_cost_per_token_priority": 1.5e-06,

View file

@ -365,6 +365,28 @@ def test_get_supported_openai_params_parallel_tool_calls_without_tool_choice(
assert "tool_choice" not in supported_params
# https://api.fireworks.ai/v1/serverless/models?format=nested, read 2026-10-29
_LATEST_ROUTER_ALIAS_TARGETS: Final = (
("accounts/fireworks/routers/minimax-latest", "accounts/fireworks/models/minimax-m3"),
("accounts/fireworks/routers/kimi-latest", "accounts/fireworks/models/kimi-k3"),
("accounts/fireworks/routers/kimi-fast-latest", "accounts/fireworks/routers/kimi-k3-fast"),
("accounts/fireworks/routers/qwen-max-latest", "accounts/fireworks/models/qwen3p8-max"),
("accounts/fireworks/routers/glm-latest", "accounts/fireworks/models/glm-5p3"),
("accounts/fireworks/routers/glm-fast-latest", "accounts/fireworks/routers/glm-5p3-fast"),
("accounts/fireworks/routers/glm-flash-latest", "accounts/fireworks/models/glm-5p3-flash"),
("accounts/fireworks/routers/deepseek-flash-latest", "accounts/fireworks/models/deepseek-v4p1-flash-1017"),
)
@pytest.mark.parametrize(("alias", "target"), _LATEST_ROUTER_ALIAS_TARGETS)
def test_latest_router_alias_accepts_the_same_params_as_the_model_it_points_to(alias: str, target: str) -> None:
config: Final = FireworksAIConfig()
alias_params: Final = set(config.get_supported_openai_params(alias))
assert alias_params == set(config.get_supported_openai_params(target))
assert "tool_choice" in alias_params
def test_get_provider_info_omits_false_supports_reasoning(monkeypatch):
"""Test that Fireworks only overrides supports_reasoning for supported models."""
config = FireworksAIConfig()