{"record":{"id":"1c333586ce191633","repo":"BerriAI/litellm","slug":"vector-store-id-must-be-a-non-empty-string","errorCode":null,"errorMessage":"vector_store_id must be a non-empty string","messagePattern":"vector_store_id must be a non-empty string","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"litellm/proxy/rag_endpoints/endpoints.py","lineNumber":78,"sourceCode":"                _raise_vector_store_scan_depth_exceeded()\n            return\n        payload_stack.append((value, next_depth))\n\n\ndef _collect_vector_store_ids_from_payload(payload: object) -> set[str]:\n    vector_store_ids: Final[set[str]] = set()\n    payload_stack: Final = [(payload, 0)]\n\n    while payload_stack:\n        current_payload, depth = payload_stack.pop()\n        if depth > DEFAULT_MAX_RECURSE_DEPTH:\n            _raise_vector_store_scan_depth_exceeded()\n\n        if isinstance(current_payload, dict):\n            for key, value in current_payload.items():\n                if key == \"vector_store_id\":\n                    if not isinstance(value, str) or not value:\n                        raise HTTPException(\n                            status_code=400,\n                            detail={\"error\": \"vector_store_id must be a non-empty string\"},\n                        )\n                    vector_store_ids.add(value)\n                    continue\n                if isinstance(value, (dict, list)):\n                    _append_payload_to_scan_stack(\n                        payload_stack=payload_stack,\n                        value=value,\n                        next_depth=depth + 1,\n                    )\n        elif isinstance(current_payload, list):\n            for item in current_payload:\n                _append_payload_to_scan_stack(\n                    payload_stack=payload_stack,\n                    value=item,\n                    next_depth=depth + 1,\n                )","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/rag_endpoints/endpoints.py#L60-L96","documentation":"Payload validation in the RAG ingest flow: a 'vector_store_id' key was found in the payload, but its value is not a non-empty string (null, empty, or wrong type), so it cannot be used for authorization or routing; the offending value is at fault, not the payload shape.","triggerScenarios":"Thrown at litellm/proxy/rag_endpoints/endpoints.py:78 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide vector_store_id as a non-empty string in the request."],"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"}