diff --git a/litellm/litellm_core_utils/get_supported_openai_params.py b/litellm/litellm_core_utils/get_supported_openai_params.py index e87042b9101..646be371ecf 100644 --- a/litellm/litellm_core_utils/get_supported_openai_params.py +++ b/litellm/litellm_core_utils/get_supported_openai_params.py @@ -191,7 +191,9 @@ def get_supported_openai_params( ) elif custom_llm_provider == "sambanova": if request_type == "embeddings": - litellm.SambaNovaEmbeddingConfig().get_supported_openai_params(model=model) + return litellm.SambaNovaEmbeddingConfig().get_supported_openai_params( + model=model + ) else: return litellm.SambanovaConfig().get_supported_openai_params(model=model) elif custom_llm_provider == "nebius": diff --git a/tests/test_litellm/litellm_core_utils/test_get_supported_openai_params.py b/tests/test_litellm/litellm_core_utils/test_get_supported_openai_params.py index 3c280c6ba92..84900e3f2ed 100644 --- a/tests/test_litellm/litellm_core_utils/test_get_supported_openai_params.py +++ b/tests/test_litellm/litellm_core_utils/test_get_supported_openai_params.py @@ -132,3 +132,17 @@ def test_azure_base_model_detection_preserved(): assert params is not None assert "reasoning_effort" in params assert "tools" in params + + +def test_sambanova_embeddings_request_returns_list_not_none(): + """The sambanova embeddings branch resolved the config but dropped the result, + so embedding requests got ``None`` instead of the supported-params list while the + chat branch returned correctly. A list (the sambanova embeddings config exposes no + extra params, hence ``[]``) must reach the caller.""" + embedding_params = get_supported_openai_params( + model="E5-Mistral-7B-Instruct", + custom_llm_provider="sambanova", + request_type="embeddings", + ) + + assert embedding_params == []