{"record":{"id":"841856d0c08abe09","repo":"exo-explore/exo","slug":"unsupported-mlx-dtype-on-wire-dtype","errorCode":null,"errorMessage":"Unsupported mlx dtype on wire: {dtype}","messagePattern":"Unsupported mlx dtype on wire: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"src/exo/worker/engines/mlx/disaggregated/adapter.py","lineNumber":38,"sourceCode":"    write_done,\n    write_header,\n    write_kv_chunk,\n)\nfrom exo.worker.engines.mlx.types import KVCacheType\nfrom exo.worker.runner.bootstrap import logger\n\n_STR_TO_MX: dict[DType, mx.Dtype] = {\n    \"bfloat16\": mx.bfloat16,\n    \"float16\": mx.float16,\n    \"float32\": mx.float32,\n}\n\n_MX_TO_STR: dict[mx.Dtype, DType] = {v: k for k, v in _STR_TO_MX.items()}\n\n\ndef mx_dtype_to_str(dtype: mx.Dtype) -> DType:\n    if dtype not in _MX_TO_STR:\n        raise ValueError(f\"Unsupported mlx dtype on wire: {dtype}\")\n    return _MX_TO_STR[dtype]\n\n\ndef wire_dtype_from_cache(caches: KVCacheType) -> DType:\n    for c in caches:\n        keys: mx.array | None = getattr(c, \"keys\", None)\n        if keys is None:\n            continue\n        if keys.dtype in _MX_TO_STR:\n            return _MX_TO_STR[keys.dtype]\n        break\n    return \"bfloat16\"\n\n\ndef str_to_mx_dtype(dtype: DType) -> mx.Dtype:\n    if dtype not in _STR_TO_MX:\n        raise ValueError(f\"Unsupported wire dtype: {dtype!r}\")\n    return _STR_TO_MX[dtype]","sourceCodeStart":20,"sourceCodeEnd":56,"githubUrl":"https://github.com/exo-explore/exo/blob/21a54c5ea0230a3bec1e1a786d200126c7e34ec6/src/exo/worker/engines/mlx/disaggregated/adapter.py#L20-L56","documentation":"Error \"Unsupported mlx dtype on wire: {dtype}\" thrown in exo-explore/exo.","triggerScenarios":"Thrown at src/exo/worker/engines/mlx/disaggregated/adapter.py:38 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"21a54c5ea0230a3bec1e1a786d200126c7e34ec6","analyzedAt":"2026-08-26T00:02:16.033Z","schemaVersion":2},"datasetVersion":"2026-08-26T04:18:47.238Z"}