mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-26 01:12:21 +00:00
* fix(responses): drop client_metadata before bridging to chat completions Codex CLI sends client_metadata on every /v1/responses call. For a provider with no native Responses config the chat-completions bridge forwarded the raw kwargs, so client_metadata reached the provider as a chat body field and Databricks rejected the request with an unknown field 400. The bridge now drops the Responses-only request fields before calling completion while still passing every other kwarg through, so deployment-level params such as chat_template_kwargs keep reaching providers without a native config. * fix(databricks): merge consecutive system messages for chat-template models Codex sends instructions plus a leading developer item, which the Responses bridge and the developer-to-system translation turn into two consecutive system messages that Databricks chat-template models reject with "System message must be at the beginning". Each run of consecutive system messages is now merged into one before the request is built for non-Claude models. Also keep client_metadata out of the bridged chat request even when allowed_openai_params names it, so both bridge branches drop the same set. * fix(databricks): skip empty system messages when merging consecutive ones Databricks drops empty content before the merge, so a system message in a run could carry no content key and the merge iterated None. Those messages are now skipped; a run with no content at all keeps its first message. --------- Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| chat | ||
| responses | ||
| databricks_config.template.txt | ||
| test_databricks_common_utils.py | ||
| test_databricks_cost_calculator.py | ||
| test_databricks_e2e.py | ||
| test_databricks_partner_integration.py | ||
| test_databricks_streaming_utils.py | ||