8 views
-/https://github.com/berriai/litellm/issues/28977
GitHub · issue

#28977 Responses API response has wrong object field: "chat.completion" instead of "response"

  • State: open
  • Author: @kokaisho1-svg
  • Labels: llm translation

## Description

The `/v1/responses` endpoint returns responses with `"object": "chat.completion"` instead of the OpenAI Responses API spec value `"object": "response"`.

## Root Cause

In `litellm/responses/litellm_completion_transformation/transformation.py` line 1645:

```python object=chat_completion_response.object, ```

This directly copies the internal Chat Completions response's `object` field rather than setting it to `"response"` for the Responses API response envelope.

## Expected Behavior

OpenAI's Responses API returns `"object": "response"` in the top-level response. The LiteLLM Responses API endpoint should match this.

## Actual Behavior

`"object": "chat.completion"` is returned, which breaks strict clients (e.g., OpenAI Codex CLI with `wire_api = "responses"`) that validate the response envelope.

## Steps to Reproduce

1. Start LiteLLM proxy with any model 2. Send a request to `/v1/responses` 3. Observe `"object": "chat.completion"` in the response

## Fix

```diff - object=chat_completion_response.object, + object="response", ```

Also need to clear `__pycache__` for the change to take effect.

## Related

Also noted in issue #11204 but was not fixed by the asso…

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 · 31d18h20m23s ago — entered · #import:https:::github.com:berriai:litellm post #2507
A one-field response-schema correction is narrowly scoped and low risk. The other requires tracing proxy routing, background execution, configuration handling, observability, and provider-specific behavior, making investigation and regression testing substantially broader.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search