{"record":{"id":"853a5fc06392f379","repo":"vllm-project/vllm","slug":"model-model-get-hf-id-r-has-no-usable-hardwar","errorCode":null,"errorMessage":"Model {model.get('hf_id')!r} has no usable hardware JSON paths.","messagePattern":"Model (.+?) has no usable hardware JSON paths\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"tools/recipes/recipe_json_to_vllm_config.py","lineNumber":372,"sourceCode":"        raise ValueError(\n            f\"Model {model.get('hf_id')!r} has no rendered \"\n            \"recommended_command in the Recipes API.\"\n        )\n\n    raw_by_hardware = recommended.get(\"by_hardware\")\n    if not isinstance(raw_by_hardware, dict) or not raw_by_hardware:\n        raise ValueError(\n            f\"Model {model.get('hf_id')!r} has no per-hardware renderings \"\n            \"in recommended_command.by_hardware.\"\n        )\n\n    by_hardware = {\n        str(hw): path\n        for hw, path in raw_by_hardware.items()\n        if isinstance(path, str) and path\n    }\n    if not by_hardware:\n        raise ValueError(\n            f\"Model {model.get('hf_id')!r} has no usable hardware JSON paths.\"\n        )\n\n    hardware, path = select_hardware(by_hardware, requested_hardware)\n    hardware_json_url = api_url(api_base, path)\n    hardware_data = load_json(hardware_json_url)\n    if not isinstance(hardware_data, dict):\n        raise ValueError(f\"{hardware_json_url} did not return a JSON object.\")\n\n    interactive = requested_model is None or requested_hardware is None\n    strategy, resolved = select_strategy(\n        api_base,\n        hardware_json_url,\n        hardware_data,\n        requested_strategy,\n        interactive,\n    )\n","sourceCodeStart":354,"sourceCodeEnd":390,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/tools/recipes/recipe_json_to_vllm_config.py#L354-L390","documentation":"by_hardware was a non-empty dict, but after filtering every entry down to string values that are non-empty ({str(hw): path for ... if isinstance(path, str) and path}), the result is empty. All hardware entries had non-string or blank path values (e.g. null, numbers, or \"\"), so no hardware JSON can be fetched.","triggerScenarios":"by_hardware contains keys like {\"h100\": null} or {\"h100\": \"\"} — renderings listed but paths not filled in; or a schema where values are objects (e.g. {\"h100\": {\"path\": ...}}) rather than plain strings.","commonSituations":"Partially populated API records; schema change from string paths to structured objects; test fixtures that mimic key names but not value types.","solutions":["curl the model JSON and inspect the actual value types inside recommended_command.by_hardware","If values became structured objects, update the vllm checkout (the tool expects plain string paths)","Fetch a hardware recipe JSON by another means and pass it as the positional source"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"bh = model_data[\"recommended_command\"][\"by_hardware\"]\nusable = {hw: p for hw, p in bh.items() if isinstance(p, str) and p}\nif not usable:\n    raise SystemExit(\"all by_hardware entries have non-string/empty paths\")","typeGuard":"def usable_hardware_paths(bh: dict) -> dict[str, str]:\n    return {str(hw): p for hw, p in bh.items() if isinstance(p, str) and p}","tryCatchPattern":null,"preventionTips":["Validate value types, not just key presence, when consuming semi-structured API data","Report models whose by_hardware values are null to the Recipes maintainers"],"tags":["vllm-recipes","api-discovery","data-quality"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}