mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-14 09:03:16 +00:00
fix(proxy): use the typed shared client for gateway discovery
This commit is contained in:
parent
2d20eab0e0
commit
e50a8007ea
1 changed files with 2 additions and 2 deletions
|
|
@ -6,8 +6,8 @@ from typing import TYPE_CHECKING, Final
|
|||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
import litellm
|
||||
from litellm.constants import NON_LLM_CONNECTION_TIMEOUT, OPENAI_CHAT_COMPLETION_PARAMS
|
||||
from litellm.llms.custom_httpx.http_handler import get_httpx_client
|
||||
from litellm.secret_managers.main import get_secret_bool, get_secret_str
|
||||
from litellm.types.router import LiteLLM_Params
|
||||
from litellm.utils import add_path_to_api_base
|
||||
|
|
@ -69,7 +69,7 @@ class LiteLLMProxyChatConfig(OpenAIGPTConfig):
|
|||
api_base, api_key = self._get_openai_compatible_provider_info(api_base, api_key)
|
||||
if api_base is None:
|
||||
raise ValueError("api_base not set for LiteLLM Proxy route. Set in env via `LITELLM_PROXY_API_BASE`")
|
||||
response: Final = get_httpx_client().get(
|
||||
response: Final = litellm.module_level_client.client.get(
|
||||
url=add_path_to_api_base(api_base, "/v1/models"),
|
||||
headers={"Authorization": f"Bearer {api_key}"},
|
||||
timeout=NON_LLM_CONNECTION_TIMEOUT,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue