{"record":{"id":"196586537152c573","repo":"BerriAI/litellm","slug":"retrieval-config-must-be-an-object","errorCode":null,"errorMessage":"retrieval_config must be an object","messagePattern":"retrieval_config must be an object","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"litellm/proxy/rag_endpoints/endpoints.py","lineNumber":650,"sourceCode":"\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\n        # Add litellm data\n        request_data: dict[str, object] = {}\n        request_data = await add_litellm_data_to_request(\n            data=request_data,\n            request=request,","sourceCodeStart":632,"sourceCodeEnd":668,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/rag_endpoints/endpoints.py#L632-L668","documentation":"RAG query type check: retrieval_config was supplied but is not a JSON object/dict (e.g. a string or list), so its fields cannot be read; rejected with 400 after the presence check passed.","triggerScenarios":"Thrown at litellm/proxy/rag_endpoints/endpoints.py:650 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Send retrieval_config as a JSON object, not a string or array."],"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"}