mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
working responses_api
This commit is contained in:
parent
7546dfde41
commit
98718f6f09
4 changed files with 16 additions and 11 deletions
|
@ -62,10 +62,16 @@ def _get_metadata_variable_name(request: Request) -> str:
|
|||
"""
|
||||
if RouteChecks._is_assistants_api_request(request):
|
||||
return "litellm_metadata"
|
||||
if "batches" in request.url.path:
|
||||
return "litellm_metadata"
|
||||
if "/v1/messages" in request.url.path:
|
||||
# anthropic API has a field called metadata
|
||||
LITELLM_METADATA_ROUTES = [
|
||||
"batches" "/v1/messages",
|
||||
"responses",
|
||||
]
|
||||
if any(
|
||||
[
|
||||
litellm_metadata_route in request.url.path
|
||||
for litellm_metadata_route in LITELLM_METADATA_ROUTES
|
||||
]
|
||||
):
|
||||
return "litellm_metadata"
|
||||
else:
|
||||
return "metadata"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue