Skip to content

fix(bedrock): stop base_model label from stripping tools/tool_choice - #1

Closed
andrey-dubnik wants to merge 1 commit into
litellm_internal_stagingfrom
litellm_fix_bedrock_base_model_label_drops_tools
Closed

fix(bedrock): stop base_model label from stripping tools/tool_choice#1
andrey-dubnik wants to merge 1 commit into
litellm_internal_stagingfrom
litellm_fix_bedrock_base_model_label_drops_tools

Conversation

@andrey-dubnik

@andrey-dubnik andrey-dubnik commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

A Router/proxy Bedrock deployment whose model_info.base_model is a friendly
label (e.g. claude-haiku-4-5) silently lost tools/tool_choice: the outgoing
Converse request was built without toolConfig, so the model behaved as if no
tools were provided. Worked in v1.84.0, regressed in v1.85.0, and with
drop_params=true it failed silently.

Two changes compound into the bug. completion() passed model_info.base_model
as the model argument to get_optional_params, so the real Bedrock model id
never reached supported-param resolution; and get_supported_openai_params
resolved the provider config's params from base_model or model, letting the
label fully replace the real model. For Bedrock the label resolves to no tool
support, so tools/tool_choice were dropped before transformation.

completion() now keeps model as the real deployment model and threads the
resolved base_model (kwarg or model_info) through separately, and
get_supported_openai_params treats base_model as additive: it returns the
union of the params supported by model and by base_model. A hint can only add
capabilities, never strip ones the real model already exposes, which also
preserves the original base_model behavior from BerriAI#27717 and Azure's base_model
driven model-type detection.

Fixes BerriAI#29618
@andrey-dubnik

Copy link
Copy Markdown
Collaborator Author

Reopening against BerriAI/litellm upstream from the fork per the contributing flow; this fork-internal PR was opened by mistake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant