{"record":{"id":"b7753b0bd8580991","repo":"sgl-project/sglang","slug":"extra-config-spdk-passthrough-must-be-a-dict-of","errorCode":null,"errorMessage":"extra_config['spdk_passthrough'] must be a dict of spdk_* field overrides","messagePattern":"extra_config\\['spdk_passthrough'\\] must be a dict of spdk_\\* field overrides","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/mem_cache/storage/umbp/umbp_store.py","lineNumber":412,"sourceCode":"        if \"spdk_proxy_idle_exit_timeout_ms\" in extra:\n            cfg.ssd.spdk_proxy_idle_exit_timeout_ms = int(\n                extra[\"spdk_proxy_idle_exit_timeout_ms\"]\n            )\n        if \"spdk_proxy_allow_borrow\" in extra:\n            cfg.ssd.spdk_proxy_allow_borrow = _strict_bool(\n                extra[\"spdk_proxy_allow_borrow\"], \"spdk_proxy_allow_borrow\"\n            )\n        if \"spdk_proxy_reserved_shared_bytes\" in extra:\n            cfg.ssd.spdk_proxy_reserved_shared_bytes = int(\n                extra[\"spdk_proxy_reserved_shared_bytes\"]\n            )\n\n        # Expert escape hatch for advanced SPDK knobs outside the stable\n        # extra_config surface, forwarded to UMBPSsdConfig as-is.\n        if \"spdk_passthrough\" in extra:\n            overrides = extra[\"spdk_passthrough\"]\n            if not isinstance(overrides, dict):\n                raise ValueError(\n                    \"extra_config['spdk_passthrough'] must be a dict of \"\n                    \"spdk_* field overrides\"\n                )\n            applied = []\n            for field_name, field_value in overrides.items():\n                if not field_name.startswith(\"spdk_\") or not hasattr(\n                    cfg.ssd, field_name\n                ):\n                    raise ValueError(\n                        f\"spdk_passthrough: unknown SSD config field {field_name!r} \"\n                        \"(must be an existing spdk_* field on UMBPSsdConfig)\"\n                    )\n                current = getattr(cfg.ssd, field_name)\n                setattr(\n                    cfg.ssd,\n                    field_name,\n                    _cast_like(current, field_value, field_name),\n                )","sourceCodeStart":394,"sourceCodeEnd":430,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/mem_cache/storage/umbp/umbp_store.py#L394-L430","documentation":"spdk_passthrough is an expert escape hatch forwarding raw spdk_* overrides to UMBPSsdConfig; it must be a dict mapping field names to values. Passing a string/list/None raises this ValueError.","triggerScenarios":"Setting extra_config['spdk_passthrough'] to a non-dict, e.g. a JSON string or a list of key=value pairs.","commonSituations":"Passing un-parsed JSON from the CLI (the extra config arrives as a str instead of a dict).","solutions":["Pass an actual dict: {'spdk_passthrough': {'spdk_some_knob': value}}","If config comes from CLI JSON, ensure it is parsed into a dict before constructing the store"],"exampleFix":"# before\nextra['spdk_passthrough'] = '{\"spdk_io_queue_count\": 4}'  # string!\n# after\nextra['spdk_passthrough'] = {'spdk_io_queue_count': 4}","handlingStrategy":"type-guard","validationCode":"if 'spdk_passthrough' in extra:\n    assert isinstance(extra['spdk_passthrough'], dict), 'spdk_passthrough must be a dict'\n    if isinstance(extra['spdk_passthrough'], str):\n        extra['spdk_passthrough'] = json.loads(extra['spdk_passthrough'])","typeGuard":"def is_spdk_passthrough_dict(v) -> bool:\n    return isinstance(v, dict)","tryCatchPattern":null,"preventionTips":["Parse CLI JSON into dicts before store construction","Never pass stringified maps into spdk_passthrough"],"tags":["umbp","spdk","config-validation"],"backgroundTag":"config-validation-failed","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}