{"record":{"id":"9d5cfcb7788c3918","repo":"BerriAI/litellm","slug":"oci-returned-image-content-in-a-streaming-response","errorCode":null,"errorMessage":"OCI returned image content in a streaming response — not supported","messagePattern":"OCI returned image content in a streaming response — not supported","errorType":"exception","errorClass":"OCIError","httpStatus":500,"severity":"error","filePath":"litellm/llms/oci/chat/generic.py","lineNumber":390,"sourceCode":"        raise OCIError(\n            status_code=500,\n            message=f\"Chunk cannot be parsed as OCIStreamChunk: {e}\",\n        )\n\n    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:","sourceCodeStart":372,"sourceCodeEnd":408,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/oci/chat/generic.py#L372-L408","documentation":"Error \"OCI returned image content in a streaming response — not supported\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/oci/chat/generic.py:390 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["OCI streaming does not support image content; use a non-streaming call."],"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-15T22:17:37.221Z"}