fix(api_route): expose provider info helper

This commit is contained in:
DennyHo0917 2026-09-07 20:12:06 +08:00
parent 6f46550c18
commit ef4e641a0a
2 changed files with 2 additions and 2 deletions

View file

@ -853,7 +853,7 @@ def _get_openai_compatible_provider_info(
(
api_base,
dynamic_api_key,
) = litellm.APIRouteChatConfig()._get_openai_compatible_provider_info(api_base, api_key)
) = litellm.APIRouteChatConfig().get_openai_compatible_provider_info(api_base, api_key)
elif custom_llm_provider == "wandb":
api_base = api_base or get_secret("WANDB_API_BASE") or "https://api.inference.wandb.ai/v1"
dynamic_api_key = api_key or get_secret_str("WANDB_API_KEY")

View file

@ -9,7 +9,7 @@ class APIRouteChatConfig(OpenAIGPTConfig):
def custom_llm_provider(self) -> str | None:
return "api_route"
def _get_openai_compatible_provider_info(
def get_openai_compatible_provider_info(
self, api_base: str | None, api_key: str | None
) -> tuple[str | None, str | None]:
resolved_api_base: Final = api_base or get_secret_str("API_ROUTE_BASE_URL") or "https://global.api-route.com/v1"