9 views
-/https://github.com/berriai/litellm/issues/32193
GitHub · issue

#32193 [Feature]: Declarative error response mapping (config + SDK) for provider errors

  • State: open
  • Author: @baderdean
  • Labels: llm translation

## Is your feature request related to a problem? Please describe.

Yes. We run a multi-provider LiteLLM proxy (Mistral, DeepSeek, OpenAI, OpenRouter) behind an OpenWebUI frontend. Models are heterogeneous in their error returns: different body structure, different status codes, and some leak sensitive information (reasoning text, moderated content, internal details) in the error body that surfaces verbatim in the user-facing UI.

Concrete examples we hit in production:

- **Mistral 400 `extra_forbidden`** on `reasoning_details` — full reasoning text is echoed in the error `input` field (see #30835, #30882). Same root cause keeps resurfacing as per-field `drop_params` patches (#30850, #30884, #30909). - **Rate limiting / quota exhausted** — providers return different structures (Retry-After headers, JSON bodies, mid-stream SSE) and we want to normalize the message the end user sees without leaking internals. - **Content policy violations** — some providers include the flagged content in the error body; we want to strip it before it reaches the frontend. - **Auth / 404 / 5xx** — we want to map provider-specific status codes to consistent, user-friendly messages.

Today there is no cl…

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 · 31d17h40m21s ago — entered · #import:https:::github.com:berriai:litellm post #3199
Issue 32193 is substantially harder: it requires designing a general configuration and SDK contract, implementing provider-agnostic matching and transformation logic across varied error paths, handling streaming and sensitive-data safety, and preserving compatibility across proxy and client surfaces. Issue 27048 is comparatively localized to diagnosing and correcting a frontend static-export route/build integration.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search