BerriAI/litellm · error · ValueError
MILVUS_API_KEY is not set. Either set it in the litellm_para
Error message
MILVUS_API_KEY is not set. Either set it in the litellm_params or set the MILVUS_API_KEY environment variable.
What it means
Error "MILVUS_API_KEY is not set. Either set it in the litellm_params or set the MILVUS_API_KEY environment variable." thrown in BerriAI/litellm.
Source
Thrown at litellm/llms/milvus/vector_stores/transformation.py:56
class MilvusVectorStoreConfig(BaseVectorStoreConfig):
"""
Configuration for Milvus Vector Store
This implementation uses the Azure AI Search API for vector store operations.
Supports vector search with embeddings generated via litellm.embeddings.
"""
def __init__(self):
super().__init__()
def validate_environment(self, headers: dict, litellm_params: GenericLiteLLMParams | None) -> dict:
api_key: str | None = None
if litellm_params is not None:
api_key = litellm_params.api_key or get_secret_str("MILVUS_API_KEY")
if not api_key:
raise ValueError(
"MILVUS_API_KEY is not set. Either set it in the litellm_params or set the MILVUS_API_KEY environment variable."
)
headers.update({"Authorization": f"Bearer {api_key}"})
return headers
def get_auth_credentials(self, litellm_params: dict) -> BaseVectorStoreAuthCredentials:
api_key: Final = litellm_params.get("api_key")
if not api_key:
raise ValueError(
"MILVUS_API_KEY is not set. Either set it in the litellm_params or set the MILVUS_API_KEY environment variable."
)
return {
"headers": {
"Authorization": f"Bearer {api_key}",
},
}View on GitHub (pinned to 6c2dcb801b)
Solutions
- Set MILVUS_API_KEY in litellm_params or the environment.
When it happens
Trigger: Thrown at litellm/llms/milvus/vector_stores/transformation.py:56 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/81c859d776373a6d.
Report an issue: GitHub.