Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

Remove dead embedding encoding fallback

Cursor Agentdf41973110b4
diff --git a/litellm/main.py b/litellm/main.py
index 6d5f9f9b05c..979dbe19d96 100644
--- a/litellm/main.py
+++ b/litellm/main.py
@@ -4924,8 +4924,7 @@ def embedding( # noqa: PLR0915
optional_params["encoding_format"] = encoding_format
else:
optional_params["encoding_format"] = (
- optional_params.get("encoding_format")
- or get_secret_str("LITELLM_DEFAULT_EMBEDDING_ENCODING_FORMAT")
+ get_secret_str("LITELLM_DEFAULT_EMBEDDING_ENCODING_FORMAT")
or "float"
)