mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-17 09:34:48 +00:00
* fix(decisions): answer 400 naming extra_headers when it is not an object A non-object extra_headers (string, int, list) or a non-string header value crashed /v1/decisions and /v1/systemone with a 500. It is now validated with the rest of the request, so it answers 400 naming extra_headers, and under drop_params the malformed entries are dropped and the call goes through. * fix(decisions): drop only the bad entry of extra_headers when its name is not a string * fix(decisions): send an empty extra_headers as no headers, as before * fix(decisions): keep main's assets drop and stop the extra_headers 400 from echoing the value * fix(decisions): reject header text the HTTP clients cannot send, and share the check with the JEV classifier A non-ASCII or CR/LF extra_headers name or value now answers 400, or is dropped under drop_params, instead of failing in httpx or aiohttp with a 500. The JEV classifier reads headers through the same helper, so a header the call drops no longer hides the deployment's input limits. * fix(decisions): require token header names, trim header values, and keep traceparent forwarding off non-object extra_headers * fix(decisions): keep printable header names sendable and cut a rejected header name at its first space or colon in the 400 * fix(decisions): require extra_headers names to be HTTP tokens * fix(proxy): keep a supplied empty extra_headers object when forwarding traceparent --------- Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_call.py | ||
| test_main.py | ||