BerriAI/litellm · error · OCIError

Unsupported content type in OCI streaming response: {item.ty

Error message

Unsupported content type in OCI streaming response: {item.type}

What it means

Error "Unsupported content type in OCI streaming response: {item.type}" thrown in BerriAI/litellm.

Source

Thrown at litellm/llms/oci/chat/generic.py:395

    if typed_chunk.index is None:
        typed_chunk.index = 0

    # Emit ``content=None`` rather than ``content=""`` on chunks with no text
    # parts (e.g. tool-call-only or keep-alive chunks) so downstream
    # stream-mergers that distinguish "no text in this delta" from "an
    # explicitly empty text delta" behave correctly.
    text: str | None = None
    if typed_chunk.message and typed_chunk.message.content:
        for item in typed_chunk.message.content:
            if isinstance(item, OCITextContentPart):
                text = (text or "") + item.text
            elif isinstance(item, OCIImageContentPart):
                raise OCIError(
                    status_code=500,
                    message="OCI returned image content in a streaming response — not supported",
                )
            else:
                raise OCIError(
                    status_code=500,
                    message=f"Unsupported content type in OCI streaming response: {item.type}",
                )

    # Build plain tool-call dicts inline (matching the shape produced by
    # ``handle_cohere_stream_chunk``) rather than calling
    # ``adapt_tools_to_openai_standard`` and ``model_dump``-ing the typed
    # objects. Both code paths feed ``Delta.tool_calls``, so emitting the
    # same minimal ``{"id", "type", "function": {"name", "arguments"}}``
    # shape keeps downstream stream-mergers behaving identically across
    # GENERIC and Cohere chunks.
    tool_calls: list[dict[str, Any]] | None = None
    if typed_chunk.message and typed_chunk.message.toolCalls:
        tool_calls = [
            {
                "id": tc.id or _synthesize_oci_tool_call_id(i, tc.name, tc.arguments),
                "type": "function",
                "function": {

View on GitHub (pinned to 6c2dcb801b)

Solutions

  1. Remove the unsupported content type from the OCI streaming response handling.

When it happens

Trigger: Thrown at litellm/llms/oci/chat/generic.py:395 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15). Data as JSON: /api/errors/5e4f9fe53a29db8f. Report an issue: GitHub.