mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-14 23:21:35 +00:00
fix(sambanova): return embeddings supported params instead of dropping them (#30937)
This commit is contained in:
parent
0a359ceb20
commit
e5ce7abefb
2 changed files with 17 additions and 1 deletions
|
|
@ -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":
|
||||
|
|
|
|||
|
|
@ -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 == []
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue