mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
fix: greptile feedback
This commit is contained in:
parent
da71199c93
commit
1972dbf19f
1 changed files with 7 additions and 2 deletions
|
|
@ -4774,11 +4774,16 @@ class StandardLoggingPayloadSetup:
|
|||
|
||||
# Populate requester_custom_headers from proxy_server_request
|
||||
# headers so custom x-* headers are available in logging callbacks.
|
||||
if proxy_server_request is not None:
|
||||
# Only set if not already populated (e.g. by enterprise middleware via
|
||||
# the metadata copy loop above).
|
||||
if (
|
||||
clean_metadata["requester_custom_headers"] is None
|
||||
and proxy_server_request is not None
|
||||
):
|
||||
_request_headers = proxy_server_request.get("headers", {})
|
||||
if _request_headers and isinstance(_request_headers, dict):
|
||||
custom_headers = {
|
||||
k: v
|
||||
k.lower(): v
|
||||
for k, v in _request_headers.items()
|
||||
if k.lower().startswith("x-")
|
||||
and v is not None
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue