{"record":{"id":"5da6db5d45dbb677","repo":"vllm-project/vllm","slug":"model-model-get-hf-id-r-has-no-per-hardware-r","errorCode":null,"errorMessage":"Model {model.get('hf_id')!r} has no per-hardware renderings in recommended_command.by_hardware.","messagePattern":"Model (.+?) has no per-hardware renderings in recommended_command\\.by_hardware\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"tools/recipes/recipe_json_to_vllm_config.py","lineNumber":361,"sourceCode":"    model_json_path = model.get(\"json\")\n    if not isinstance(model_json_path, str) or not model_json_path:\n        raise ValueError(f\"Selected model {model.get('hf_id')!r} has no JSON API path.\")\n\n    model_json_url = api_url(api_base, model_json_path)\n    model_data = load_json(model_json_url)\n    if not isinstance(model_data, dict):\n        raise ValueError(f\"{model_json_url} did not return a JSON object.\")\n\n    recommended = model_data.get(\"recommended_command\")\n    if not isinstance(recommended, dict):\n        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):","sourceCodeStart":343,"sourceCodeEnd":379,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/tools/recipes/recipe_json_to_vllm_config.py#L343-L379","documentation":"The model's recommended_command exists, but its 'by_hardware' key is absent, not a dict, or an empty dict. The converter iterates by_hardware to offer hardware choices (or match --hardware), so an empty/invalid mapping means there is nothing to convert.","triggerScenarios":"recommended_command rendered but by_hardware missing (e.g. only a generic command was rendered); hardware renderings not yet published for the model; schema change renamed the key (e.g. 'hardware' or 'by_gpu').","commonSituations":"Newly listed models whose hardware recipes are still being rendered; API schema evolution; mirroring only part of the recipe payload.","solutions":["curl the model JSON and check recommended_command.by_hardware contents","Try a different model that has hardware renderings, or fetch a hardware recipe JSON directly and pass it as the positional source","Update the vllm checkout if the API schema changed","Report the incomplete rendering to the Recipes API maintainers"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"rc = model_data[\"recommended_command\"]\nbh = rc.get(\"by_hardware\")\nif not isinstance(bh, dict) or not bh:\n    raise SystemExit(\"recommended_command.by_hardware missing or empty\")","typeGuard":"def has_hardware_map(model_data: dict) -> bool:\n    rc = model_data.get(\"recommended_command\")\n    return isinstance(rc, dict) and isinstance(rc.get(\"by_hardware\"), dict) and len(rc[\"by_hardware\"]) > 0","tryCatchPattern":null,"preventionTips":["Check hardware availability for your target GPU before scripting around discovery","Version-lock against the Recipes API schema your automation expects"],"tags":["vllm-recipes","api-discovery","hardware"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}