Pass litellm proxy specific metadata

This commit is contained in:
Ishaan Jaff 2024-07-23 15:31:30 -07:00
parent 4c1ee1e282
commit a71b60d005
4 changed files with 13 additions and 1 deletions

View file

@ -39,6 +39,9 @@ def _get_metadata_variable_name(request: Request) -> str:
"""
if "thread" in request.url.path or "assistant" in request.url.path:
return "litellm_metadata"
if "/v1/messages" in request.url.path:
# anthropic API has a field called metadata
return "litellm_metadata"
else:
return "metadata"