{"record":{"id":"81c859d776373a6d","repo":"BerriAI/litellm","slug":"milvus-api-key-is-not-set-either-set-it-in-the-li","errorCode":null,"errorMessage":"MILVUS_API_KEY is not set. Either set it in the litellm_params or set the MILVUS_API_KEY environment variable.","messagePattern":"MILVUS_API_KEY is not set\\. Either set it in the litellm_params or set the MILVUS_API_KEY environment variable\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/milvus/vector_stores/transformation.py","lineNumber":56,"sourceCode":"\nclass MilvusVectorStoreConfig(BaseVectorStoreConfig):\n    \"\"\"\n    Configuration for Milvus Vector Store\n\n    This implementation uses the Azure AI Search API for vector store operations.\n    Supports vector search with embeddings generated via litellm.embeddings.\n    \"\"\"\n\n    def __init__(self):\n        super().__init__()\n\n    def validate_environment(self, headers: dict, litellm_params: GenericLiteLLMParams | None) -> dict:\n        api_key: str | None = None\n        if litellm_params is not None:\n            api_key = litellm_params.api_key or get_secret_str(\"MILVUS_API_KEY\")\n\n        if not api_key:\n            raise ValueError(\n                \"MILVUS_API_KEY is not set. Either set it in the litellm_params or set the MILVUS_API_KEY environment variable.\"\n            )\n\n        headers.update({\"Authorization\": f\"Bearer {api_key}\"})\n\n        return headers\n\n    def get_auth_credentials(self, litellm_params: dict) -> BaseVectorStoreAuthCredentials:\n        api_key: Final = litellm_params.get(\"api_key\")\n        if not api_key:\n            raise ValueError(\n                \"MILVUS_API_KEY is not set. Either set it in the litellm_params or set the MILVUS_API_KEY environment variable.\"\n            )\n        return {\n            \"headers\": {\n                \"Authorization\": f\"Bearer {api_key}\",\n            },\n        }","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/milvus/vector_stores/transformation.py#L38-L74","documentation":"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.","triggerScenarios":"Thrown at litellm/llms/milvus/vector_stores/transformation.py:56 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set MILVUS_API_KEY in litellm_params or the environment."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}