BerriAI/litellm · error · ValueError
embedding_model is required in litellm_params for Milvus. Yo
Error message
embedding_model is required in litellm_params for Milvus. You can call any litellm embedding model.Example: litellm_params['embedding_model'] = 'azure/text-embedding-3-large'
What it means
Error "embedding_model is required in litellm_params for Milvus. You can call any litellm embedding model.Example: litellm_params['embedding_model'] = 'azure/text-embedding-3-large'" thrown in BerriAI/litellm.
Source
Thrown at litellm/llms/milvus/vector_stores/transformation.py:139
vector_store_search_optional_params: VectorStoreSearchOptionalRequestParams,
api_base: str,
litellm_logging_obj: LiteLLMLoggingObj,
litellm_params: dict,
extra_body: dict[str, Any] | None = None,
) -> tuple[str, dict[str, Any]]:
"""
Transform search request for Azure AI Search API
Generates embeddings using litellm.embeddings and constructs Azure AI Search request
"""
# Convert query to string if it's a list
if isinstance(query, list):
query = " ".join(query)
# Get embedding model from litellm_params (required)
embedding_model: Final = litellm_params.get("litellm_embedding_model")
if not embedding_model:
raise ValueError(
"embedding_model is required in litellm_params for Milvus. You can call any litellm embedding model."
"Example: litellm_params['embedding_model'] = 'azure/text-embedding-3-large'"
)
embedding_config: Final = litellm_params.get("litellm_embedding_config", {})
if not embedding_config:
raise ValueError(
"embedding_config is required in litellm_params for Milvus. You can call any litellm embedding model."
"Example: litellm_params['embedding_config'] = {'api_base': 'https://krris-mh44uf7y-eastus2.cognitiveservices.azure.com/', 'api_key': 'os.environ/AZURE_API_KEY', 'api_version': '2025-09-01'}"
)
# Get top_k (number of results to return)
# Generate embedding for the query using litellm.embeddings
try:
embedding_response: Final = litellm.embedding(
model=embedding_model,
input=[query],
**embedding_config,View on GitHub (pinned to 6c2dcb801b)
Solutions
- Set litellm_params['embedding_model'] for Milvus.
When it happens
Trigger: Thrown at litellm/llms/milvus/vector_stores/transformation.py:139 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15).
Data as JSON: /api/errors/e4860432ec251936.
Report an issue: GitHub.