{"record":{"id":"b300fcd88d4700c1","repo":"openai/openai-python","slug":"not-handled-yet","errorCode":null,"errorMessage":"not handled yet","messagePattern":"not handled yet","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"src/openai/lib/streaming/_assistants.py","lineNumber":1035,"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":1017,"sourceCodeEnd":1042,"githubUrl":"https://github.com/openai/openai-python/blob/9917c6e28e66e90e1227b3d223c06a8c5441515a/src/openai/lib/streaming/_assistants.py#L1017-L1042","documentation":"Raised inside accumulate_delta when an indexed list delta entry resolves to an existing accumulated entry (no IndexError) but that existing entry is not a dict, so recursive merging cannot proceed. This signals mixed-type lists (scalars and dicts) in accumulated state - a shape the accumulator explicitly does not support yet, hence the 'not handled yet' placeholder.","triggerScenarios":"A list that was first extended with scalar values (str/int/float fast path) later receiving dict entries at those indices, so acc_value[index] is a scalar while delta_entry is a dict; occurs with schema-evolving streaming payloads or synthetic fixtures.","commonSituations":"Beta API fields whose list contents changed type between events; SDK version older than the API contract; fuzz/property tests feeding mixed-type lists.","solutions":["Upgrade the openai SDK - accumulator support for new payload shapes lands with schema updates","Avoid feeding mixed scalar/dict lists into accumulate_delta in custom code","Reset the accumulated list (start from the latest snapshot) instead of continuing accumulation after schema drift","Report the event sequence to OpenAI if reproducible on current versions"],"exampleFix":"# before\nacc = {\"items\": [\"a\", \"b\"]}\nacc = accumulate_delta(acc, {\"items\": [{\"index\": 0, \"text\": \"x\"}]})  # raises\n\n# after\nacc = {\"items\": [{\"index\": 0, \"text\": \"x\"}]}  # reset state, don't mix types","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])  # reset the list","preventionTips":["Never mix scalar and dict entries in one accumulated list","Rebuild accumulated state from the latest snapshot after schema drift","Stay current on SDK releases for accumulator fixes"],"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"}