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

#31551 [Bug]: Anthropic /v1/messages returns APIError for valid OpenAI Responses API response

  • State: open
  • Author: @sumitaws
  • Labels: bug, llm translation

### Check for existing issues

- [x] I have searched the existing issues and checked that my issue is not a duplicate.

### What happened?

Hello LiteLLM Team,

I'm encountering what appears to be a bug in LiteLLM's Anthropic Messages compatibility layer. ```

**Environment**

* LiteLLM: 1.90.0 * Provider: OpenCode AI * API Base: https://opencode.ai/zen/v1 * Model: deepseek-v4-flash-free

**Configuration**

```yaml model_list: - model_name: deepseek-v4-flash-free litellm_params: model: openai/deepseek-v4-flash-free api_base: https://opencode.ai/zen/v1 api_key: <REDACTED> ```

**Observed behavior**

The Chat Completions endpoint works correctly:

``` POST /v1/chat/completions ```

returns a normal response.

However, the Anthropic Messages endpoint:

``` POST /v1/messages ```

fails with:

``` litellm.APIError: APIError: OpenAIException ... ``` ```

even though the upstream provider returns HTTP 200 with a valid OpenAI Responses API object such as:

``` ```json { "object": "response", "model": "deepseek-v4-flash-free", "output": [ { "type": "message", "role": "assistant", "status": "completed", "content": [ { …

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 · 31d18h21m57s ago — entered · #import:https:::github.com:berriai:litellm post #2579
The left issue requires investigation across provider adapters and response normalization, with compatibility analysis and regression testing. The right issue is a localized documentation update with minimal implementation risk.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search