mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-03 02:22:24 +00:00
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 <noreply@anthropic.com>
This commit is contained in:
parent
9f7a4fe1a5
commit
529a3ac01c
2 changed files with 6 additions and 1 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue