{"record":{"id":"fde567c15e89fcc4","repo":"BerriAI/litellm","slug":"error-message-fde567","errorCode":null,"errorMessage":"{error_message}","messagePattern":"\\{error_message\\}","errorType":"http","errorClass":"BaseLLMException","httpStatus":null,"severity":"error","filePath":"litellm/llms/base_llm/vector_store/transformation.py","lineNumber":130,"sourceCode":"        self,\n        api_base: str | None,\n        litellm_params: dict,\n    ) -> str:\n        \"\"\"\n        OPTIONAL\n\n        Get the complete url for the request\n\n        Some providers need `model` in `api_base`\n        \"\"\"\n        if api_base is None:\n            raise ValueError(\"api_base is required\")\n        return api_base\n\n    def get_error_class(self, error_message: str, status_code: int, headers: dict | httpx.Headers) -> BaseLLMException:\n        from ..chat.transformation import BaseLLMException\n\n        raise BaseLLMException(\n            status_code=status_code,\n            message=error_message,\n            headers=headers,\n        )\n\n    def sign_request(\n        self,\n        headers: dict,\n        optional_params: dict,\n        request_data: dict,\n        api_base: str,\n        api_key: str | None = None,\n    ) -> tuple[dict, bytes | None]:\n        \"\"\"Optionally sign or modify the request before sending.\n\n        Providers like AWS Bedrock require SigV4 signing. Providers that don't\n        require any signing can simply return the headers unchanged and ``None``\n        for the signed body.","sourceCodeStart":112,"sourceCodeEnd":148,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/base_llm/vector_store/transformation.py#L112-L148","documentation":"The shared error constructor of BaseVectorStoreConfig: when a vector-store HTTP request (create/query/delete store) returns a non-2xx response, litellm calls get_error_class(), raising BaseLLMException with the provider's message ('{error_message}' is that literal text), status code, and headers. It is the uniform packaging of upstream vector-store failures.","triggerScenarios":"Any vector-store operation whose upstream call fails: invalid/missing credentials (401), nonexistent vector store id (404), malformed create payload (400), quota limits (429), or service down (5xx) — e.g. litellm.acreate_vector_store against a misconfigured Pinecone/LlamaIndex-compatible backend.","commonSituations":"Expired or wrong VECTOR_STORE_API_KEY; wrong api_base pointing at a non-vector-store route (404s); payload schema drift after provider API changes; proxy auth headers missing.","solutions":["Read status_code + message off the exception to classify: 401/403 -> fix credentials; 404 -> verify vector store id and api_base path; 400 -> validate payload against provider schema.","Verify api_base for the vector-store deployment points at the correct API route.","Rotate/refresh credentials and set them via env vars or litellm config rather than hardcoding.","Wrap calls with retry/backoff for transient 5xx/429 responses."],"exampleFix":"# before\nstore = litellm.acreate_vector_store(provider=\"myvdb\", create_request=req)  # 401 -> BaseLLMException\n\n# after\ntry:\n    store = await litellm.acreate_vector_store(provider=\"myvdb\", create_request=req)\nexcept BaseLLMException as e:\n    if e.status_code in (401, 403):\n        raise RuntimeError(\"vector-store auth failed; check VECTOR_STORE_API_KEY\") from e\n    raise","handlingStrategy":"try-catch","validationCode":"import httpx\n\n# preflight: backend reachable and authorized before CRUD traffic\nr = httpx.get(f\"{api_base}/health\", headers={\"Authorization\": f\"Bearer {api_key}\"}, timeout=5)\nassert r.status_code < 500, \"vector store backend unhealthy\"","typeGuard":"def is_vector_store_error(e: BaseException) -> bool:\n    return getattr(type(e), \"__name__\", \"\") == \"BaseLLMException\" and hasattr(e, \"status_code\")","tryCatchPattern":"try:\n    store = await litellm.acreate_vector_store(provider=p, create_request=req)\nexcept BaseLLMException as e:\n    if e.status_code in (401, 403):\n        refresh_provider_credentials(p)\n    elif e.status_code == 404:\n        raise RuntimeError(f\"api_base route wrong for {p}\") from e\n    else:\n        raise","preventionTips":["Health-check vector-store backends before serving traffic.","Alert on repeated 4xx from vector stores — usually credential drift or route changes."],"tags":["vector-store","http-error","provider-error","litellm"],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}