diff --git a/litellm/litellm_core_utils/get_llm_provider_logic.py b/litellm/litellm_core_utils/get_llm_provider_logic.py index d93cc39888f..d9ad9dd90ff 100644 --- a/litellm/litellm_core_utils/get_llm_provider_logic.py +++ b/litellm/litellm_core_utils/get_llm_provider_logic.py @@ -291,7 +291,7 @@ def get_llm_provider( custom_llm_provider = "nscale" dynamic_api_key = litellm.NscaleConfig.get_api_key() elif endpoint == litellm.NebiusConfig.API_BASE_URL.removeprefix("https://"): - custom_llm_provider = "nebius" + custom_llm_provider = "nebius" # rebind-ok: resolve the provider from its canonical endpoint dynamic_api_key = api_key or get_secret_str("NEBIUS_API_KEY") elif endpoint == "dashscope-intl.aliyuncs.com/compatible-mode/v1": custom_llm_provider = "dashscope" @@ -608,7 +608,9 @@ def _get_openai_compatible_provider_info( api_base = api_base or get_secret("LLAMA_API_BASE") or "https://api.llama.com/compat/v1" dynamic_api_key = api_key or get_secret_str("LLAMA_API_KEY") elif custom_llm_provider == "nebius": - api_base = api_base or get_secret("NEBIUS_API_BASE") or litellm.NebiusConfig.API_BASE_URL + api_base = ( # rebind-ok: fill the provider default when the caller did not pass an endpoint + api_base or get_secret("NEBIUS_API_BASE") or litellm.NebiusConfig.API_BASE_URL + ) dynamic_api_key = api_key or get_secret_str("NEBIUS_API_KEY") elif custom_llm_provider == "ollama": api_base = api_base or get_secret("OLLAMA_API_BASE") or "http://localhost:11434" diff --git a/litellm/main.py b/litellm/main.py index efa933fe77f..eb0eaf5f8ed 100644 --- a/litellm/main.py +++ b/litellm/main.py @@ -6202,7 +6202,7 @@ def embedding( or custom_llm_provider == "litellm_proxy" or (model in litellm.open_ai_embedding_models and custom_llm_provider is None) ): - api_base = ( + api_base = ( # rebind-ok: fill the provider default for the embedding request api_base or litellm.api_base or get_secret_str("OPENAI_BASE_URL")