BerriAI/litellm · error · ValueError

chunk_method and pipeline_id are mutually exclusive. Specify

Error message

chunk_method and pipeline_id are mutually exclusive. Specify either chunk_method or pipeline_id, not both.

What it means

Cross-field guard in the RAGFlow dataset-creation mapping: metadata supplied both chunk_method and pipeline_id, which select mutually exclusive ingestion modes (built-in chunking vs pipeline), so the request is rejected instead of picking one.

Source

Thrown at litellm/llms/ragflow/vector_stores/transformation.py:149

            # RAGFlow-specific fields that can be in metadata
            ragflow_fields: Final = [
                "avatar",
                "description",
                "embedding_model",
                "permission",
                "chunk_method",
                "parser_config",
                "parse_type",
                "pipeline_id",
            ]

            for field in ragflow_fields:
                if field in metadata:
                    request_body[field] = metadata[field]

        # Validate: chunk_method and pipeline_id are mutually exclusive
        if "chunk_method" in request_body and "pipeline_id" in request_body:
            raise ValueError(
                "chunk_method and pipeline_id are mutually exclusive. "
                "Specify either chunk_method or pipeline_id, not both."
            )

        # If neither chunk_method nor pipeline_id is specified, default to naive
        if "chunk_method" not in request_body and "pipeline_id" not in request_body:
            request_body["chunk_method"] = "naive"

        return url, request_body

    def transform_create_vector_store_response(self, response: httpx.Response) -> VectorStoreCreateResponse:
        """
        Transform RAGFlow response to VectorStoreCreateResponse format.

        RAGFlow response format:
        {
            "code": 0,
            "data": {

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Pass only one of chunk_method or pipeline_id.
  2. Remove the other parameter from the request.

Example fix

# create(..., chunk_method="naive") or create(..., pipeline_id="...") — not both
Defensive patterns

Strategy: validation

When it happens

Trigger: Triggered when both chunk_method and pipeline_id are specified for a RAGFlow dataset; they are mutually exclusive.

Common situations: See trigger scenarios.


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