From 4101c0ceb2e213a177613d89220bb2e64d191aeb Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Thu, 24 Sep 2026 18:08:46 -0700 Subject: [PATCH] docs(cost-map): describe the bedrock native chat completions capability flags --- ci_cd/generate_model_prices_schema.py | 20 ++++++++++++++++++- .../crates/model-catalog/src/model_info.rs | 2 ++ model_prices_and_context_window.schema.json | 6 ++++-- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/ci_cd/generate_model_prices_schema.py b/ci_cd/generate_model_prices_schema.py index 8eec07dadda..f54177def8e 100644 --- a/ci_cd/generate_model_prices_schema.py +++ b/ci_cd/generate_model_prices_schema.py @@ -211,6 +211,24 @@ NUMBER_KEYS: dict[str, JsonSchema] = { }, } +BOOLEAN_KEYS: dict[str, JsonSchema] = { + "supports_bedrock_runtime_chat_completions_response_format": { + "type": "boolean", + "description": ( + "The Bedrock native /v1/chat/completions route enforces a json_schema response_format for this model; " + "unset means LiteLLM serves those requests through Converse's json_tool_call emulation." + ), + }, + "supports_bedrock_runtime_chat_completions_tools_with_reasoning": { + "type": "boolean", + "description": ( + "The Bedrock native /v1/chat/completions route serves this model's function tools with any " + "reasoning_effort; unset means LiteLLM serves a tools request through Converse unless reasoning_effort " + "is exactly 'none'." + ), + }, +} + COST_DESCRIPTIONS: dict[str, str] = { "input_cost_per_token": "USD per prompt token.", "output_cost_per_token": "USD per generated token.", @@ -292,7 +310,7 @@ def string_key_schemas(modes: tuple) -> dict[str, JsonSchema]: def classify(key: str, modes: tuple) -> Optional[JsonSchema]: - curated = {**OBJECT_KEYS, **ARRAY_KEYS, **string_key_schemas(modes), **INTEGER_KEYS, **NUMBER_KEYS} + curated = {**OBJECT_KEYS, **ARRAY_KEYS, **string_key_schemas(modes), **INTEGER_KEYS, **NUMBER_KEYS, **BOOLEAN_KEYS} if key in curated: return curated[key] if key.startswith("supports_") or key in EXTRA_BOOLEAN_KEYS: diff --git a/litellm-rust/crates/model-catalog/src/model_info.rs b/litellm-rust/crates/model-catalog/src/model_info.rs index 23e69f66492..5dda91b2213 100644 --- a/litellm-rust/crates/model-catalog/src/model_info.rs +++ b/litellm-rust/crates/model-catalog/src/model_info.rs @@ -581,8 +581,10 @@ pub struct ModelInfo { pub supports_audio_input: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub supports_audio_output: Option, + /// The Bedrock native /v1/chat/completions route enforces a json_schema response_format for this model; unset means LiteLLM serves those requests through Converse's json_tool_call emulation. #[serde(default, skip_serializing_if = "Option::is_none")] pub supports_bedrock_runtime_chat_completions_response_format: Option, + /// The Bedrock native /v1/chat/completions route serves this model's function tools with any reasoning_effort; unset means LiteLLM serves a tools request through Converse unless reasoning_effort is exactly 'none'. #[serde(default, skip_serializing_if = "Option::is_none")] pub supports_bedrock_runtime_chat_completions_tools_with_reasoning: Option, #[serde(default, skip_serializing_if = "Option::is_none")] diff --git a/model_prices_and_context_window.schema.json b/model_prices_and_context_window.schema.json index bcb0509f25c..d9a7dd2fff5 100644 --- a/model_prices_and_context_window.schema.json +++ b/model_prices_and_context_window.schema.json @@ -903,10 +903,12 @@ "type": "boolean" }, "supports_bedrock_runtime_chat_completions_response_format": { - "type": "boolean" + "type": "boolean", + "description": "The Bedrock native /v1/chat/completions route enforces a json_schema response_format for this model; unset means LiteLLM serves those requests through Converse's json_tool_call emulation." }, "supports_bedrock_runtime_chat_completions_tools_with_reasoning": { - "type": "boolean" + "type": "boolean", + "description": "The Bedrock native /v1/chat/completions route serves this model's function tools with any reasoning_effort; unset means LiteLLM serves a tools request through Converse unless reasoning_effort is exactly 'none'." }, "supports_computer_use": { "type": "boolean"