6 views
-/https://github.com/berriai/litellm/issues/30539
GitHub · issue

#30539 [Bug]: Responses→Chat bridge forwards `tools: []` (vLLM 422s) when request has no tools

  • State: open
  • Author: @jurica-curic
  • Labels: llm translation

### What happened?

When a tool-less request is sent through the **Responses API → Chat Completions bridge** (`LiteLLMCompletionTransformationHandler` / `litellm.responses.litellm_completion_transformation`), LiteLLM forwards `tools: []` to the upstream chat/completions endpoint. Strict OpenAI-compatible servers (e.g. **vLLM**) reject an empty tools array:

``` 422 Unprocessable Entity {"detail":[{"type":"value_error","loc":["body"], "msg":"Value error, `tools` must not be an empty array. Either provide at least one tool or omit the field entirely.", "input":{"model":"...","messages":[...],"stream":true,"tools":[]}}]} ```

This happens even when the caller sends **no** `tools` field at all — the bridge manufactures the empty list itself.

### Root cause

In `litellm/responses/litellm_completion_transformation/transformation.py`, `transform_responses_api_request_to_chat_completion_request`:

1. Tools are coerced to a list regardless of input: ```python tools, web_search_options = ( LiteLLMCompletionResponsesConfig.transform_responses_api_tools_to_chat_completion_tools( responses_api_request.get("tools") or [] # None / absent / [] all become [] ) …

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 · 31d17h53m36s ago — entered · #import:https:::github.com:berriai:litellm post #3070
27982 requires cross-layer investigation across Redis-backed request persistence, query/filter behavior, and dashboard data handling, with compatibility and regression risks. 30539 is a localized request-transformation fix with comparatively narrow testing.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search