From b49032fc8046951a027b6028e5d9555f27cf703b Mon Sep 17 00:00:00 2001 From: mubashir1osmani Date: Mon, 24 Aug 2026 14:01:33 -0400 Subject: [PATCH] feat: route additional providers to openai embeddings --- litellm/main.py | 3 +++ .../test_openai_compatible_embedding_providers.py | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/litellm/main.py b/litellm/main.py index 62c498a79c9..39ff2618ddf 100644 --- a/litellm/main.py +++ b/litellm/main.py @@ -6225,6 +6225,9 @@ def embedding( or custom_llm_provider == "byteplus" or custom_llm_provider == "digitalocean" or custom_llm_provider == "siliconflow" + or custom_llm_provider == "deepinfra" + or custom_llm_provider == "nscale" + or custom_llm_provider == "novita" or (model in litellm.open_ai_embedding_models and custom_llm_provider is None) ): api_base = ( diff --git a/tests/test_litellm/test_openai_compatible_embedding_providers.py b/tests/test_litellm/test_openai_compatible_embedding_providers.py index 8980c191d92..3f7fb7c9275 100644 --- a/tests/test_litellm/test_openai_compatible_embedding_providers.py +++ b/tests/test_litellm/test_openai_compatible_embedding_providers.py @@ -5,7 +5,10 @@ import pytest import litellm -@pytest.mark.parametrize("provider", ["byteplus", "digitalocean", "siliconflow"]) +@pytest.mark.parametrize( + "provider", + ["byteplus", "digitalocean", "siliconflow", "deepinfra", "nscale", "novita"], +) def test_openai_compatible_provider_embedding_dispatch(provider): mock_response = MagicMock() mock_response.parse.return_value = MagicMock(