litellm/tests/unit/llms/databricks/messages
owen-hj ea82857967
fix(bedrock,databricks): forward the server-side-fallback beta and drop it under drop_params where the model lacks it (#53857)
* fix(bedrock): forward server-side-fallback-2026-06-01 on Bedrock Invoke and Mantle

Bedrock Invoke and Bedrock Mantle accept server-side-fallback-2026-06-01, which a fallback content block in the message history needs. The bedrock and bedrock_mantle beta columns did not list it, so the proxy dropped it and /v1/messages answered 400 on a fallback-block history

Both columns now forward the 2026-06-01 beta and drop server-side-fallback-2026-07-01, which both platforms reject. The compiled Rust column matches the JSON

* fix(bedrock,databricks): forward the fallback beta on Databricks and drop it under drop_params where the model lacks it

Databricks Claude needs server-side-fallback-2026-06-01 for a fallback-block history, the same as Bedrock Invoke
and Mantle, so its column forwards the June beta and nulls July

Opus 4.1 rejects the June beta with 400 invalid beta flag. A supports_server_side_fallback capability, resolved from
a claude-server-side-fallback cost-map rule (Claude 4.5 and newer) or the deployment's model_info, lets drop_params
drop the beta for a model that lacks it on Bedrock Invoke, Mantle and Databricks, in Python and Rust. Without
drop_params the beta still goes through and the provider answers its own 400

* fix(bedrock,databricks): name the model_info override in the server-side-fallback beta drop warning

* fix(bedrock): read base_model for an application inference profile ARN in the server-side-fallback beta check

The drop of server-side-fallback-2026-06-01 under drop_params looked up only the model name, so an application
inference profile ARN, which names no model, always counted as unsupported. The check now resolves the deployment's
base_model for such an ARN, the same way the other Bedrock capability lookups do, in Python and in the Rust Invoke path

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-11-24 03:09:16 +00:00
..
__init__.py fix(databricks): use the native Anthropic route for Claude /v1/messages (#46091) 2026-10-18 02:44:38 +00:00
test_databricks_messages_transformation.py fix(bedrock,databricks): forward the server-side-fallback beta and drop it under drop_params where the model lacks it (#53857) 2026-11-24 03:09:16 +00:00