feat(pass_through_endpoints.py): support returning api-base on pass-through endpoints

Make it easier to debug what the api base sent to provider was
This commit is contained in:
Krrish Dholakia 2025-03-20 20:11:49 -07:00
parent bc71407c83
commit 45a65d71f3
2 changed files with 17 additions and 3 deletions

View file

@ -57,7 +57,9 @@ class ProxyBaseLLMRequestProcessing:
"x-litellm-call-id": call_id,
"x-litellm-model-id": model_id,
"x-litellm-cache-key": cache_key,
"x-litellm-model-api-base": api_base,
"x-litellm-model-api-base": (
api_base.split("?")[0] if api_base else None
), # don't include query params, risk of leaking sensitive info
"x-litellm-version": version,
"x-litellm-model-region": model_region,
"x-litellm-response-cost": str(response_cost),