BerriAI/litellm · error · HTTPException

internal_user_viewer role can only ingest files to an existi

Error message

internal_user_viewer role can only ingest files to an existing vector store. Provide 'vector_store_id' in ingest_options.vector_store.

What it means

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.

Source

Thrown at litellm/proxy/rag_endpoints/endpoints.py:470

    """
    from litellm.proxy.proxy_server import (
        add_litellm_data_to_request,
        general_settings,
        llm_router,
        prisma_client,
        proxy_config,
        version,
    )

    try:
        # Parse request
        ingest_options, file_data, file_url, file_id = await parse_rag_ingest_request(request)

        # INTERNAL_USER_VIEW_ONLY can ingest to existing vector stores only
        if user_api_key_dict.user_role == LitellmUserRoles.INTERNAL_USER_VIEW_ONLY.value and not ingest_options.get(
            "vector_store", {}
        ).get("vector_store_id"):
            raise HTTPException(
                status_code=status.HTTP_403_FORBIDDEN,
                detail={
                    "error": "internal_user_viewer role can only ingest files to an existing vector store. "
                    "Provide 'vector_store_id' in ingest_options.vector_store."
                },
            )

        await _authorize_nested_vector_store_ids(
            payload=ingest_options,
            user_api_key_dict=user_api_key_dict,
        )

        try:
            is_request_body_safe(
                request_body=ingest_options.get("vector_store", {}),
                general_settings=general_settings,
                llm_router=llm_router,
                model="",

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Pass vector_store_id of an existing vector store in ingest_options.vector_store, or use a role allowed to create vector stores.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at litellm/proxy/rag_endpoints/endpoints.py:470 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18). Data as JSON: /api/errors/4c1d86f16fc31c92. Report an issue: GitHub.