BerriAI/litellm · error · HTTPException

Filtered or sub-attribute paths are not supported for

Error message

Filtered or sub-attribute paths are not supported for {base}; PATCH the full attribute

What it means

SCIM PATCH handling for multi-valued attributes (entitlements/roles): a path containing a value filter or sub-attribute (e.g. roles[0].value) is more granular than LiteLLM supports, so the whole PATCH is rejected with 400 and the client told to patch the full attribute.

Solutions

  1. PATCH the full attribute instead of using filtered or sub-attribute paths.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at litellm/proxy/management_endpoints/scim/scim_v2.py:1744 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/706bd216d8a7222d. Report an issue: GitHub.

Appendix: source

Thrown at litellm/proxy/management_endpoints/scim/scim_v2.py:1744

    elif op_type == "add":
        teams_set.update(group_values)
    elif op_type == "remove":
        for gid in group_values:
            teams_set.discard(gid)
    return None


def _multi_valued_attribute_base(path: str) -> str:
    """The attribute name a SCIM path targets, stripped of any value filter or sub-attribute."""
    return path.split("[", 1)[0].split(".", 1)[0]


def _handle_multi_valued_attribute_update(path: str, op_type: str, value: object, metadata: dict[str, object]) -> None:
    """Handle add/replace/remove for the entitlements and roles multi-valued attributes."""
    base: Final = _multi_valued_attribute_base(path)
    metadata_key: Final = SCIM_MULTI_VALUED_ATTRIBUTE_METADATA_KEYS[base]
    if path != base:
        raise HTTPException(
            status_code=400,
            detail={"error": f"Filtered or sub-attribute paths are not supported for {base}; PATCH the full attribute"},
        )

    if op_type == "remove":
        metadata.pop(metadata_key, None)
        return

    if value is None:
        raise HTTPException(
            status_code=400,
            detail={"error": f"The {op_type} operation on {base} requires a 'value' member (RFC 7644 Section 3.5.2)"},
        )

    normalized: Final = value if isinstance(value, list) else [value]
    try:
        attrs: Final = SCIM_MULTI_VALUED_LIST_ADAPTER.validate_python(normalized)
    except ValidationError:

View on GitHub (pinned to 77b7c6c40c)