{"record":{"id":"5e4f9fe53a29db8f","repo":"BerriAI/litellm","slug":"unsupported-content-type-in-oci-streaming-response","errorCode":null,"errorMessage":"Unsupported content type in OCI streaming response: {item.type}","messagePattern":"Unsupported content type in OCI streaming response: (.+?)","errorType":"exception","errorClass":"OCIError","httpStatus":500,"severity":"error","filePath":"litellm/llms/oci/chat/generic.py","lineNumber":395,"sourceCode":"    if typed_chunk.index is None:\n        typed_chunk.index = 0\n\n    # Emit ``content=None`` rather than ``content=\"\"`` on chunks with no text\n    # parts (e.g. tool-call-only or keep-alive chunks) so downstream\n    # stream-mergers that distinguish \"no text in this delta\" from \"an\n    # explicitly empty text delta\" behave correctly.\n    text: str | None = None\n    if typed_chunk.message and typed_chunk.message.content:\n        for item in typed_chunk.message.content:\n            if isinstance(item, OCITextContentPart):\n                text = (text or \"\") + item.text\n            elif isinstance(item, OCIImageContentPart):\n                raise OCIError(\n                    status_code=500,\n                    message=\"OCI returned image content in a streaming response — not supported\",\n                )\n            else:\n                raise OCIError(\n                    status_code=500,\n                    message=f\"Unsupported content type in OCI streaming response: {item.type}\",\n                )\n\n    # Build plain tool-call dicts inline (matching the shape produced by\n    # ``handle_cohere_stream_chunk``) rather than calling\n    # ``adapt_tools_to_openai_standard`` and ``model_dump``-ing the typed\n    # objects. Both code paths feed ``Delta.tool_calls``, so emitting the\n    # same minimal ``{\"id\", \"type\", \"function\": {\"name\", \"arguments\"}}``\n    # shape keeps downstream stream-mergers behaving identically across\n    # GENERIC and Cohere chunks.\n    tool_calls: list[dict[str, Any]] | None = None\n    if typed_chunk.message and typed_chunk.message.toolCalls:\n        tool_calls = [\n            {\n                \"id\": tc.id or _synthesize_oci_tool_call_id(i, tc.name, tc.arguments),\n                \"type\": \"function\",\n                \"function\": {","sourceCodeStart":377,"sourceCodeEnd":413,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/oci/chat/generic.py#L377-L413","documentation":"Error \"Unsupported content type in OCI streaming response: {item.type}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/oci/chat/generic.py:395 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the unsupported content type from the OCI streaming response handling."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}