#31551 [Bug]: Anthropic /v1/messages returns APIError for valid OpenAI Responses API response
### 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": [ { …