From c3e87a9651b76d2f36269204b6cd3456effbf971 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Thu, 2 Jan 2025 16:35:19 -0800 Subject: [PATCH] fix openai_like_chat_completion --- litellm/main.py | 6 +++++- litellm/proxy/proxy_config.yaml | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/litellm/main.py b/litellm/main.py index 83a0c83d35d..7ca04b94e26 100644 --- a/litellm/main.py +++ b/litellm/main.py @@ -2824,7 +2824,7 @@ def completion( # type: ignore # noqa: PLR0915 return response response = model_response elif custom_llm_provider == "openai_like": - response = openai_like_chat.completion( + response = openai_like_chat_completion.completion( model=model, messages=messages, api_base=api_base, @@ -2834,6 +2834,10 @@ def completion( # type: ignore # noqa: PLR0915 litellm_params=litellm_params, logger_fn=logger_fn, encoding=encoding, + custom_llm_provider=custom_llm_provider, + api_key=api_key, + logging_obj=logging, + custom_prompt_dict=custom_prompt_dict, ) elif custom_llm_provider == "petals" or model in litellm.petals_models: api_base = api_base or litellm.api_base diff --git a/litellm/proxy/proxy_config.yaml b/litellm/proxy/proxy_config.yaml index 978c02dcba0..58de992e66b 100644 --- a/litellm/proxy/proxy_config.yaml +++ b/litellm/proxy/proxy_config.yaml @@ -1,6 +1,6 @@ model_list: - - model_name: "openai_like/*" + - model_name: "fake-openai-endpoint" litellm_params: - model: openai_like/* - api_base: https://exampleopenaiendpoint-production.up.railway.app/ + model: openai_like/any + api_base: https://exampleopenaiendpoint-production.up.railway.app api_key: "ishaan"