Bedrock Converse Model Compatibility#
BedrockConverse in llama-index-llms-bedrock-converse maintains several static allowlists in utils.py to handle model-specific capability differences on the AWS Bedrock Converse API. Passing an unsupported model ID or triggering an unsupported feature produces a ValueError (at init) or a ValidationException from Bedrock (at call time). Keeping these lists current is the primary maintenance surface for this integration.
Allowlists and Their Roles#
All allowlists live in utils.py.
| Constant | Purpose | Lines |
|---|---|---|
BEDROCK_MODELS | Model → context-window size. Required for metadata. | |
BEDROCK_FUNCTION_CALLING_MODELS | Models that support tool use. Controls is_function_calling_model. | |
BEDROCK_INFERENCE_PROFILE_SUPPORTED_MODELS | Models that accept us. / eu. / apac. / global. prefixes. | |
BEDROCK_NO_TEMP_MODELS | Models that reject the temperature field entirely. Temperature is stripped from inferenceConfig for these. | |
BEDROCK_NO_FORCED_TOOL_CALL_MODELS | Models that reject forced tool choice (any/tool). supports_forced_tool_calls is set False for these. |
Additional allowlists exist for prompt caching (BEDROCK_PROMPT_CACHING_SUPPORTED_MODELS), reasoning (BEDROCK_REASONING_MODELS), and adaptive thinking (BEDROCK_ADAPTIVE_THINKING_SUPPORTED_MODELS), as described in the Fable 5 PR .
Inference Profile ID Validation#
get_model_name strips the region prefix (us., eu., apac., global.) and raises ValueError if the resulting base ID is not in BEDROCK_INFERENCE_PROFILE_SUPPORTED_MODELS. This is called during metadata access and at various points in __init__, so an unrecognized inference profile ID fails immediately at construction time .
Symptom:
ValueError: Model does not support inference profiles but has an inference profile prefix: us.openai.gpt-6-sol.
Fix: Add the base model ID to all four core lists (BEDROCK_MODELS, BEDROCK_FUNCTION_CALLING_MODELS, BEDROCK_INFERENCE_PROFILE_SUPPORTED_MODELS, and any capability lists that apply).
Temperature Suppression (BEDROCK_NO_TEMP_MODELS)#
Some models — Claude Opus 4.7, Opus 4.8, Fable 5, OpenAI GPT-6 Sol/Luna/Astra — reject any value of temperature, including the library default of 0.1. BEDROCK_NO_TEMP_MODELS was introduced in #21438 and extended in #21802, #22033, and #23212 .
When a model is in BEDROCK_NO_TEMP_MODELS, temperature is omitted from inferenceConfig in both converse_with_retry and converse_with_retry_async. An explicit caller-supplied temperature is silently dropped in the same way.
Symptom:
ValidationException: This model doesn't support the temperature field. Remove temperature and try again.
Fix: Add the model ID to BEDROCK_NO_TEMP_MODELS.
Forced Tool Choice Fallback (BEDROCK_NO_FORCED_TOOL_CALL_MODELS)#
tools_to_converse_tools sends toolChoice: {"any": {}} when tool_required=True and no explicit choice is given . Some models (currently Claude Opus 5.5) reject any and tool choices entirely.
PR #23208 introduced BEDROCK_NO_FORCED_TOOL_CALL_MODELS and a guard in __init__ that overrides supports_forced_tool_calls to False for those models, even if the caller passes True. With supports_forced_tool_calls=False, tool_required=True falls back to {"auto": {}}. In practice, Opus 5.5 still reliably calls tools under auto — the forced choice was unnecessary .
The general supports_forced_tool_calls switch was originally introduced in #20158.
Symptom:
ValidationException: tool_choice: type "tool" and "any" are not supported for this model.
Fix: Add the model to BEDROCK_NO_FORCED_TOOL_CALL_MODELS. Note: an explicit tool_choice={"any": {}} passed by the caller is still forwarded as-is, so callers forcing the choice directly will still receive a 400.
Adding a New Model — Checklist#
Every new Bedrock model typically needs entries in:
BEDROCK_MODELS(with context-window size)BEDROCK_FUNCTION_CALLING_MODELS(if it supports tools)BEDROCK_INFERENCE_PROFILE_SUPPORTED_MODELS(if it is inference-profile-only)BEDROCK_NO_TEMP_MODELS(if it rejectstemperature)BEDROCK_NO_FORCED_TOOL_CALL_MODELS(if it rejectsany/tooltool choice)- Additional capability lists as appropriate (prompt caching, reasoning, adaptive thinking)
See PRs #22033 , #23208 , and #23212 for recent examples of this pattern.