litellm/ui
mateo-berri 587829c3a0 fix(mcp): trim static header whitespace and surface real connection errors
A leading or trailing space in a static header value made httpx/h11 reject it
as an illegal header value, which aborted the MCP transport task group,
cancelled session.initialize(), and surfaced only as an opaque "Failed to
connect to MCP server". Strip surrounding whitespace from header names and
values in _get_auth_headers so every path (test connection, runtime, config,
DB) is protected, and mirror the trim in the UI static-header reducers so
stored values stay clean.

When the transport task group does fail, unwrap the ExceptionGroup raised on
transport context exit and re-raise the real cause (httpx ConnectError,
LocalProtocolError, ...) instead of the cancellation, so the proxy logs and
the admin test endpoint explain why the connection failed. The test endpoint
maps known causes to an actionable, secret-safe message and stops swallowing
genuine cancellation
2026-06-05 14:04:20 -07:00
..
litellm-dashboard fix(mcp): trim static header whitespace and surface real connection errors 2026-06-05 14:04:20 -07:00
Dockerfile feat: add componentized proxy deployment with gateway, backend, ui, and migrations (#27557) 2026-05-16 09:25:17 -07:00
nginx.conf feat: add componentized proxy deployment with gateway, backend, ui, and migrations (#27557) 2026-05-16 09:25:17 -07:00