fix(sambanova): return embeddings supported params instead of dropping them (#30937)

This commit is contained in:
dav nguyxn 2026-06-22 19:25:16 +07:00 committed by GitHub
parent 0a359ceb20
commit e5ce7abefb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 17 additions and 1 deletions

View file

@ -187,7 +187,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":

View file

@ -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 == []