mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-02 02:11:58 +00:00
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 |
||
|---|---|---|
| .. | ||
| litellm-dashboard | ||
| Dockerfile | ||
| nginx.conf | ||