{"record":{"id":"e8363f6853a34310","repo":"BerriAI/litellm","slug":"vector-store-id-corpus-id-is-required-for-vertex","errorCode":null,"errorMessage":"vector_store_id (corpus ID) is required for Vertex AI RAG ingestion. Please provide an existing RAG corpus ID.","messagePattern":"vector_store_id \\(corpus ID\\) is required for Vertex AI RAG ingestion\\. Please provide an existing RAG corpus ID\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/vertex_ai/rag_engine/ingestion.py","lineNumber":76,"sourceCode":"    - chunk_size: Maximum size of chunks (default: 1000)\n    - chunk_overlap: Overlap between chunks (default: 200)\n\n    Authentication:\n    - Uses Application Default Credentials (ADC)\n    - Run: gcloud auth application-default login\n    \"\"\"\n\n    def __init__(\n        self,\n        ingest_options: RAGIngestOptions,\n        router: Router | None = None,\n    ):\n        super().__init__(ingest_options=ingest_options, router=router)\n\n        # Get corpus ID (required for Vertex AI)\n        self.corpus_id = self.vector_store_config.get(\"vector_store_id\")\n        if not self.corpus_id:\n            raise ValueError(\n                \"vector_store_id (corpus ID) is required for Vertex AI RAG ingestion. \"\n                \"Please provide an existing RAG corpus ID.\"\n            )\n\n        # GCP config\n        self.vertex_project = self.vector_store_config.get(\"vertex_project\") or get_secret_str(\"VERTEXAI_PROJECT\")\n        self.vertex_location = (\n            self.vector_store_config.get(\"vertex_location\") or get_secret_str(\"VERTEXAI_LOCATION\") or \"us-central1\"\n        )\n        self.vertex_credentials = self.vector_store_config.get(\"vertex_credentials\")\n\n        # GCS bucket for file uploads\n        self.gcs_bucket = self.vector_store_config.get(\"gcs_bucket\") or os.environ.get(\"GCS_BUCKET_NAME\")\n        if not self.gcs_bucket:\n            raise ValueError(\n                \"gcs_bucket is required for Vertex AI RAG ingestion. \"\n                \"Set via vector_store config or GCS_BUCKET_NAME env var.\"\n            )","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/vertex_ai/rag_engine/ingestion.py#L58-L94","documentation":"ValueError raised in VertexRAGIngestion.__init__ when the vector_store config carries no vector_store_id. Vertex AI RAG ingestion imports files into an existing RAG corpus; LiteLLM never auto-creates corpora, so the corpus ID is mandatory at construction time.","triggerScenarios":"Building a Vertex RAG ingestion job whose vector_store config lacks vector_store_id, or stores it under a different key (e.g. 'corpus_id' or 'id').","commonSituations":"Migrating from vector stores that auto-create indexes (Pinecone, Qdrant) and assuming the same behavior; forgetting to create the corpus first with gcloud or the Console; passing the full corpus resource name instead of the bare ID.","solutions":["Create a RAG corpus first (gcloud alpha rag corpora create --display-name my-corpus, or via the Console) and copy its ID","Set vector_store_id=<corpus-id> in the vector_store config passed to ingestion","Double-check the exact key name is vector_store_id","Confirm the corpus lives in the same vertex_project / vertex_location you configure"],"exampleFix":"# before\nvector_store_config = {'vertex_project': 'my-project'}  # no vector_store_id\n\n# after\nvector_store_config = {\n    'vector_store_id': '<rag-corpus-id>',  # from `gcloud alpha rag corpora create`\n    'vertex_project': 'my-project',\n    'gcs_bucket': 'my-bucket',\n}","handlingStrategy":"validation","validationCode":"cfg = get_vector_store_config()  # your config source\nassert cfg.get('vector_store_id'), 'vector_store_id (RAG corpus ID) is required for vertex_ai RAG ingestion'","typeGuard":null,"tryCatchPattern":"try:\n    ingestion = VertexRAGIngestion(ingest_options=opts, router=router)\nexcept ValueError as e:\n    if 'vector_store_id' in str(e):\n        raise SystemExit('Create a RAG corpus and set vector_store_id in the config')\n    raise","preventionTips":["Pre-create RAG corpora and store their IDs in config management","Treat vertex_ai as bring-your-own-corpus: no auto-creation","Write a config validation step before constructing ingestion objects"],"tags":["vertex-ai","rag","vector-store","configuration","corpus"],"backgroundTag":"missing-required-argument","analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}