{"record":{"id":"9518f0bbc9c135e0","repo":"BerriAI/litellm","slug":"error-message-9518f0","errorCode":null,"errorMessage":"{error_message}","messagePattern":"\\{error_message\\}","errorType":"http","errorClass":"BaseLLMException","httpStatus":null,"severity":"error","filePath":"litellm/llms/base_llm/vector_store_files/transformation.py","lineNumber":189,"sourceCode":"    ) -> tuple[str, dict[str, Any]]: ...\n\n    @abstractmethod\n    def transform_delete_vector_store_file_response(\n        self,\n        *,\n        response: httpx.Response,\n    ) -> VectorStoreFileDeleteResponse: ...\n\n    def get_error_class(\n        self,\n        *,\n        error_message: str,\n        status_code: int,\n        headers: dict[str, Any] | httpx.Headers,\n    ) -> 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        *,\n        headers: dict[str, str],\n        optional_params: dict[str, Any],\n        request_data: dict[str, Any],\n        api_base: str,\n        api_key: str | None = None,\n    ) -> tuple[dict[str, str], bytes | None]:\n        return headers, None\n\n    def prepare_chunking_strategy(\n        self,","sourceCodeStart":171,"sourceCodeEnd":207,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/base_llm/vector_store_files/transformation.py#L171-L207","documentation":"BaseVectorStoreFilesConfig.get_error_class() is the uniform error wrapper for vector-store-file HTTP failures: it raises BaseLLMException constructed from the provider's error text ('{error_message}' is that text verbatim), status code, and headers. Seeing it means the underlying create/get/delete-file request to the vector-store backend returned an error response.","triggerScenarios":"File-level vector-store ops failing upstream: uploading/attaching a file to a nonexistent store id (404), oversized or malformed file payload (400), auth failures (401/403), provider rate limits (429).","commonSituations":"Stale vector_store_id after the store was deleted; file size/content-type rejected by the backend; rotated API keys not updated; backend route drift after a provider SDK upgrade.","solutions":["Inspect the exception's status_code and message to pinpoint: 404 -> re-fetch valid vector_store_id; 400 -> fix file payload/metadata; 401 -> refresh credentials.","Validate vector_store_id exists (list stores) before file operations.","Confirm the api_base route serves the vector-store-files API of your backend version.","Retry transient 429/5xx with backoff (litellm num_retries or router)."],"exampleFix":"# before\nfile = await litellm.acreate_vector_store_file(\n    vector_store_id=\"vs_deleted\", provider=\"myvdb\", create_request=body,\n)  # 404 -> BaseLLMException\n\n# after\nstores = await litellm.alist_vector_stores(provider=\"myvdb\")\nif \"vs_deleted\" not in [s.id for s in stores]:\n    raise ValueError(\"vector store no longer exists\")\nfile = await litellm.acreate_vector_store_file(\n    vector_store_id=\"vs_deleted\", provider=\"myvdb\", create_request=body,\n)","handlingStrategy":"try-catch","validationCode":"stores = await litellm.alist_vector_stores(provider=p, litellm_params=params)\nassert vector_store_id in {s.id for s in stores}, f\"unknown vector_store_id {vector_store_id}\"","typeGuard":"def is_vector_store_file_error(e: BaseException) -> bool:\n    return hasattr(e, \"status_code\") and hasattr(e, \"message\")","tryCatchPattern":"try:\n    f = await litellm.acreate_vector_store_file(vector_store_id=vid, provider=p, create_request=body)\nexcept BaseLLMException as e:\n    if e.status_code == 404:\n        vid = await recreate_store_and_get_id(p)\n        f = await litellm.acreate_vector_store_file(vector_store_id=vid, provider=p, create_request=body)\n    else:\n        raise","preventionTips":["Cache and refresh vector_store_ids; treat 404 as stale-id signal.","Validate file size/content-type client-side against backend limits before upload."],"tags":["vector-store","files","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"}