From eb433bde863c750affcae4ac38517ba756ed9290 Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Fri, 3 May 2024 17:57:30 -0700 Subject: [PATCH] Add route: "/engines/{model:path}/chat/completions" Without this, it results in: ```pytb Traceback (most recent call last): File "/Users/abramowi/Code/OpenSource/litellm/litellm/proxy/proxy_server.py", line 3836, in completion raise HTTPException( fastapi.exceptions.HTTPException: 400: {'error': 'completion: Invalid model name passed in model=gpt-3.5-turbo/chat'} ``` --- litellm/proxy/proxy_server.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index 55202fd160..bbeacded0c 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -3456,6 +3456,11 @@ def model_list( dependencies=[Depends(user_api_key_auth)], tags=["chat/completions"], ) +@router.post( + "/engines/{model:path}/chat/completions", + dependencies=[Depends(user_api_key_auth)], + tags=["chat/completions"], +) @router.post( "/openai/deployments/{model:path}/chat/completions", dependencies=[Depends(user_api_key_auth)],