feat: route additional providers to openai embeddings

This commit is contained in:
mubashir1osmani 2026-08-24 14:01:33 -04:00
parent a00914cd3e
commit b49032fc80
2 changed files with 7 additions and 1 deletions

View file

@ -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 = (

View file

@ -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(