{"record":{"id":"53a757e0269bfe9f","repo":"BerriAI/litellm","slug":"access-denied-you-do-not-have-permission-to-delet","errorCode":null,"errorMessage":"Access denied: You do not have permission to delete this vector store","messagePattern":"Access denied: You do not have permission to delete this vector store","errorType":"http","errorClass":"HTTPException","httpStatus":403,"severity":"error","filePath":"litellm/proxy/vector_store_endpoints/management_endpoints.py","lineNumber":739,"sourceCode":"        if litellm.vector_store_registry is not None:\n            memory_vector_store: Final = litellm.vector_store_registry.get_litellm_managed_vector_store_from_registry(\n                vector_store_id=data.vector_store_id\n            )\n            if memory_vector_store is not None:\n                memory_vector_store_exists = True\n                if vector_store_to_check is None:\n                    vector_store_to_check = memory_vector_store\n\n        # If not found in either location, raise 404\n        if not db_vector_store_exists and not memory_vector_store_exists:\n            raise HTTPException(\n                status_code=404,\n                detail=f\"Vector store with ID {data.vector_store_id} not found\",\n            )\n\n        # Check access control\n        if vector_store_to_check and not await _check_vector_store_access(vector_store_to_check, user_api_key_dict):\n            raise HTTPException(\n                status_code=403,\n                detail=\"Access denied: You do not have permission to delete this vector store\",\n            )\n\n        # Delete from database if exists\n        if db_vector_store_exists:\n            await _vector_store_table(prisma_client).delete(where={\"vector_store_id\": data.vector_store_id})\n\n        # Delete from in-memory registry if exists\n        if memory_vector_store_exists and litellm.vector_store_registry is not None:\n            litellm.vector_store_registry.delete_vector_store_from_registry(vector_store_id=data.vector_store_id)\n\n        return {\n            \"status\": \"success\",\n            \"message\": f\"Vector store {data.vector_store_id} deleted successfully\",\n        }\n    except HTTPException:\n        raise","sourceCodeStart":721,"sourceCodeEnd":757,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/vector_store_endpoints/management_endpoints.py#L721-L757","documentation":"Authorization failure on vector-store deletion: the store exists (in DB or memory registry) but the caller's key/team is not permitted to delete it. Deletion is restricted to keys with access; an admin must perform or authorize the delete.","triggerScenarios":"Thrown at litellm/proxy/vector_store_endpoints/management_endpoints.py:739 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a key/team with delete permission for this vector store, or ask an admin to grant it."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}