{"record":{"id":"a1aab3afd3d155cc","repo":"BerriAI/litellm","slug":"retrieval-config-is-required","errorCode":null,"errorMessage":"retrieval_config is required","messagePattern":"retrieval_config is required","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"litellm/proxy/rag_endpoints/endpoints.py","lineNumber":645,"sourceCode":"        model: Final = data.get(\"model\")\n        messages: Final = data.get(\"messages\")\n        retrieval_config: Final = data.get(\"retrieval_config\")\n        rerank: Final = data.get(\"rerank\")\n        stream: Final = data.get(\"stream\", False)\n\n        # Validate required fields\n        if not model:\n            raise HTTPException(\n                status_code=400,\n                detail={\"error\": \"model is required\"},\n            )\n        if not messages:\n            raise HTTPException(\n                status_code=400,\n                detail={\"error\": \"messages is required\"},\n            )\n        if not retrieval_config:\n            raise HTTPException(\n                status_code=400,\n                detail={\"error\": \"retrieval_config is required\"},\n            )\n        if not isinstance(retrieval_config, dict):\n            raise HTTPException(\n                status_code=400,\n                detail={\"error\": \"retrieval_config must be an object\"},\n            )\n        if \"vector_store_id\" not in retrieval_config:\n            raise HTTPException(\n                status_code=400,\n                detail={\"error\": \"retrieval_config must contain 'vector_store_id'\"},\n            )\n        await _authorize_nested_vector_store_ids(\n            payload=retrieval_config,\n            user_api_key_dict=user_api_key_dict,\n        )\n","sourceCodeStart":627,"sourceCodeEnd":663,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/rag_endpoints/endpoints.py#L627-L663","documentation":"RAG query validation: model and messages are present, but 'retrieval_config' is missing/null/empty, so the handler has no vector store or retrieval settings to query with; rejected with 400.","triggerScenarios":"Thrown at litellm/proxy/rag_endpoints/endpoints.py:645 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add retrieval_config to the request body with the vector store to query."],"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-14T05:17:10.506Z"}