litellm/tests/unit/llms/databricks
devin-ai-integration[bot] 2908e228f0
fix(anthropic)!: map reasoning effort none to supported thinking modes (#55848)
* fix(anthropic): reject disabling always-on thinking unless params are dropped

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(anthropic): preserve dictionary callers in messages mapping

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(anthropic): use between-tools thinking when supported

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(anthropic): preserve between-tools thinking on tool follow-ups

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(anthropic): avoid duplicate untyped capability reads

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(cost-map): register between-tools thinking capability schema

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* test(s3-log): record supports_between_tools_thinking in the s3_v2 golden payloads

* fix(anthropic): keep thinking off on tool turns and treat unmapped Opus and Sonnet 5.5 ids as always thinking

With modify_params on, a tool follow-up that sent thinking disabled dropped
the param, so Haiku 5.5 thought again and billed those tokens. The replay
guard now treats disabled like between_tools.

Cost-map fallback rules mark unmapped Opus and Sonnet ids from 5.5 on as
always thinking, and Sonnet ones as supporting between_tools, so they no
longer get disabled, which those models reject. Copilot and Mantle Sonnet 5.5
rows opt out of between_tools explicitly, since it is not verified there.

The proxy no longer advertises none for always-thinking models that refuse
it, the auto-router baseline honors per-request drop_params, and the Python
refusal text now matches the Rust one.

* fix(anthropic): treat explicit disabled thinking like reasoning_effort none

An explicit thinking.type=disabled on a model that always thinks used to be
dropped silently, so the model kept thinking and billed it. It now follows the
same rule as reasoning_effort none: between_tools where the model supports it,
otherwise a 400 unless drop_params is set, on chat, /v1/messages and Bedrock.

The model listing only stops offering none on routes where LiteLLM maps it to
Anthropic's thinking param, so gateways that forward the level keep it.

Databricks Sonnet 5.5 accepts images, so its cost map row sets supports_vision.

* fix(anthropic): keep leaving out disabled thinking where between_tools is missing

Opus 5.5, Fable and Mythos go back to the #37510 behavior for
thinking={"type": "disabled"}. LiteLLM leaves it out with a warning and the
request answers 200, so routers that send one request to several model
generations keep working. Sonnet 5.5 still gets between_tools.

The Rust /v1/messages path maps disabled thinking the same way, and Databricks
Claude chat now maps it too instead of forwarding a value Databricks rejects.

* fix(anthropic): send between_tools to Copilot and Mantle Sonnet 5.5 and keep none in Copilot listings

---------

Co-authored-by: mateo <277851410+mateo-berri@users.noreply.github.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-12-02 23:33:35 +00:00
..
agent feat(agents): support Databricks Agent Platform agents in the agent gateway (#45681) 2026-10-15 12:42:06 -07:00
chat fix(anthropic)!: map reasoning effort none to supported thinking modes (#55848) 2026-12-02 23:33:35 +00:00
decisions fix(databricks): reuse base OAuth for decisions (#48395) (#48527) 2026-10-26 20:18:16 -07:00
messages 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
responses test(unit): make every tests/unit directory a package so pytest collection is unique 2026-09-20 11:50:59 +00:00
__init__.py test(unit): make every tests/unit directory a package so pytest collection is unique 2026-09-20 11:50:59 +00:00
test_databricks_common_utils.py fix(databricks): reuse base OAuth for decisions (#48395) (#48527) 2026-10-26 20:18:16 -07:00
test_databricks_cost_calculator.py fix(cost-map): refresh successors, retirement dates and prices, add Baseten GLM-5.4 and Perplexity web search flags (#55690) 2026-12-02 18:26:42 +00:00
test_databricks_partner_integration.py feat(agents): support Databricks Agent Platform agents in the agent gateway (#45681) 2026-10-15 12:42:06 -07:00
test_databricks_streaming_utils.py fix(openai_like): end an async stream cleanly when the connection drops after the finish (#54565) 2026-11-26 07:48:41 +00:00