From 529a3ac01cde4909627e434f3b2af3bff672e6c9 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Wed, 13 May 2026 14:35:13 -0700 Subject: [PATCH] fix fireworks model name lookup and bedrock snake-case output_config leak - Fireworks: add accounts/fireworks/models/ candidate key to _get_model_cost_capability so short-form model names (e.g. fireworks_ai/qwen3-8b) resolve to their full pricing JSON entry - Bedrock: always pop snake-case output_config from inference_params to prevent it from leaking to the Converse API (which expects camelCase outputConfig); nullify the camelCase value when model doesn't support it Co-Authored-By: Claude Opus 4.6 --- litellm/llms/bedrock/chat/converse_transformation.py | 3 ++- litellm/llms/fireworks_ai/chat/transformation.py | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/litellm/llms/bedrock/chat/converse_transformation.py b/litellm/llms/bedrock/chat/converse_transformation.py index d8ed01bada5..70f430cfad9 100644 --- a/litellm/llms/bedrock/chat/converse_transformation.py +++ b/litellm/llms/bedrock/chat/converse_transformation.py @@ -1203,12 +1203,13 @@ class AmazonConverseConfig(BaseConfig): output_config: Optional[OutputConfigBlock] = inference_params.pop( "outputConfig", None ) + inference_params.pop("output_config", None) if not _supports_factory( model=strip_bedrock_routing_prefix(model), custom_llm_provider="bedrock", key="supports_output_config", ): - inference_params.pop("output_config", None) + output_config = None # keep supported params in 'inference_params', and set all model-specific params in 'additional_request_params' additional_request_params = { diff --git a/litellm/llms/fireworks_ai/chat/transformation.py b/litellm/llms/fireworks_ai/chat/transformation.py index 5499447c52e..552743f83f2 100644 --- a/litellm/llms/fireworks_ai/chat/transformation.py +++ b/litellm/llms/fireworks_ai/chat/transformation.py @@ -254,6 +254,10 @@ class FireworksAIConfig(OpenAIGPTConfig): if not model.startswith("fireworks_ai/"): candidate_keys.append(f"fireworks_ai/{model}") + stripped = model.removeprefix("fireworks_ai/") + if not stripped.startswith("accounts/"): + candidate_keys.append(f"fireworks_ai/accounts/fireworks/models/{stripped}") + for candidate_key in candidate_keys: model_info = litellm.model_cost.get(candidate_key) if model_info is not None and model_info.get(capability) is not None: