{"record":{"id":"4c1d86f16fc31c92","repo":"BerriAI/litellm","slug":"internal-user-viewer-role-can-only-ingest-files-to","errorCode":null,"errorMessage":"internal_user_viewer role can only ingest files to an existing vector store. Provide 'vector_store_id' in ingest_options.vector_store.","messagePattern":"internal_user_viewer role can only ingest files to an existing vector store\\. Provide 'vector_store_id' in ingest_options\\.vector_store\\.","errorType":"http","errorClass":"HTTPException","httpStatus":403,"severity":"error","filePath":"litellm/proxy/rag_endpoints/endpoints.py","lineNumber":470,"sourceCode":"    \"\"\"\n    from litellm.proxy.proxy_server import (\n        add_litellm_data_to_request,\n        general_settings,\n        llm_router,\n        prisma_client,\n        proxy_config,\n        version,\n    )\n\n    try:\n        # Parse request\n        ingest_options, file_data, file_url, file_id = await parse_rag_ingest_request(request)\n\n        # INTERNAL_USER_VIEW_ONLY can ingest to existing vector stores only\n        if user_api_key_dict.user_role == LitellmUserRoles.INTERNAL_USER_VIEW_ONLY.value and not ingest_options.get(\n            \"vector_store\", {}\n        ).get(\"vector_store_id\"):\n            raise HTTPException(\n                status_code=status.HTTP_403_FORBIDDEN,\n                detail={\n                    \"error\": \"internal_user_viewer role can only ingest files to an existing vector store. \"\n                    \"Provide 'vector_store_id' in ingest_options.vector_store.\"\n                },\n            )\n\n        await _authorize_nested_vector_store_ids(\n            payload=ingest_options,\n            user_api_key_dict=user_api_key_dict,\n        )\n\n        try:\n            is_request_body_safe(\n                request_body=ingest_options.get(\"vector_store\", {}),\n                general_settings=general_settings,\n                llm_router=llm_router,\n                model=\"\",","sourceCodeStart":452,"sourceCodeEnd":488,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/rag_endpoints/endpoints.py#L452-L488","documentation":"Role-based guard in RAG ingest: the caller holds the INTERNAL_USER_VIEW_ONLY role, which may only ingest into existing vector stores, and the request did not provide 'vector_store_id' in ingest_options.vector_store — i.e. it attempted to create a new vector store; rejected with 403 semantics.","triggerScenarios":"Thrown at litellm/proxy/rag_endpoints/endpoints.py:470 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass vector_store_id of an existing vector store in ingest_options.vector_store, or use a role allowed to create vector stores."],"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"}