{"record":{"id":"7812b9cdf67fedd7","repo":"openai/openai-python","slug":"not-handled-yet-7812b9","errorCode":null,"errorMessage":"not handled yet","messagePattern":"not handled yet","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"src/openai/lib/streaming/_deltas.py","lineNumber":58,"sourceCode":"            for delta_entry in delta_value:\n                if not is_dict(delta_entry):\n                    raise TypeError(f\"Unexpected list delta entry is not a dictionary: {delta_entry}\")\n\n                try:\n                    index = delta_entry[\"index\"]\n                except KeyError as exc:\n                    raise RuntimeError(f\"Expected list delta entry to have an `index` key; {delta_entry}\") from exc\n\n                if not isinstance(index, int):\n                    raise TypeError(f\"Unexpected, list delta entry `index` value is not an integer; {index}\")\n\n                try:\n                    acc_entry = acc_value[index]\n                except IndexError:\n                    acc_value.insert(index, delta_entry)\n                else:\n                    if not is_dict(acc_entry):\n                        raise TypeError(\"not handled yet\")\n\n                    acc_value[index] = accumulate_delta(acc_entry, delta_entry)\n\n        acc[key] = acc_value\n\n    return acc\n","sourceCodeStart":40,"sourceCodeEnd":65,"githubUrl":"https://github.com/openai/openai-python/blob/9917c6e28e66e90e1227b3d223c06a8c5441515a/src/openai/lib/streaming/_deltas.py#L40-L65","documentation":"Raised by accumulate_delta in _deltas.py when an indexed dict delta entry targets an accumulated list slot that already holds a non-dict value, making recursive merge impossible. The literal 'not handled yet' message marks an explicitly unsupported accumulated-state shape (mixed scalar/dict lists).","triggerScenarios":"A list first filled via the scalar extend fast-path subsequently receiving a dict entry at an existing index during Chat/Responses streaming; schema-evolving output fields or synthetic mixed-type fixtures.","commonSituations":"API fields changing list element types mid-stream across versions; older SDKs accumulating newer payloads; fuzz tests.","solutions":["Upgrade the openai SDK to pick up accumulator schema fixes","Do not mix scalar and dict entries in lists fed to accumulate_delta","Restart accumulation from a fresh snapshot after detecting schema drift","Report the event sequence if it reproduces on the latest version"],"exampleFix":"# before\nacc = {\"content\": [\"plain text\"]}\nacc = accumulate_delta(acc, {\"content\": [{\"index\": 0, \"text\": \"x\"}]})  # raises\n\n# after\nacc = {\"content\": [{\"index\": 0, \"text\": \"x\"}]}  # rebuild from snapshot","handlingStrategy":"fallback","validationCode":"null","typeGuard":"null","tryCatchPattern":"try:\n    acc = accumulate_delta(acc, delta)\nexcept TypeError as e:\n    if str(e) == \"not handled yet\":\n        acc[key] = copy.deepcopy(delta[key])","preventionTips":["Avoid mixed-type lists in accumulated state","Reset from a fresh snapshot after schema changes","Track SDK releases for accumulator updates"],"tags":["streaming","delta-accumulation","unsupported-shape","python"],"backgroundTag":"delta-schema-mismatch","analyzedSha":"9917c6e28e66e90e1227b3d223c06a8c5441515a","analyzedAt":"2026-08-28T11:46:34.183Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}