{"record":{"id":"ab3f674bf57ceeb0","repo":"vllm-project/vllm","slug":"hardware-requested-r-is-not-available-for-this-m","errorCode":null,"errorMessage":"Hardware {requested!r} is not available for this model. Available: {', '.join(hardware_ids)}","messagePattern":"Hardware (.+?) is not available for this model\\. Available: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"tools/recipes/recipe_json_to_vllm_config.py","lineNumber":253,"sourceCode":"        if requested:\n            raise ValueError(f\"No recipe model matched {requested!r}.\")\n\n        print(f\"No recipe model matched {query!r}. Try again.\")\n        query = None\n\n\ndef select_hardware(\n    by_hardware: dict[str, str], requested: str | None\n) -> tuple[str, str]:\n    hardware_ids = sorted(by_hardware)\n\n    if requested:\n        selected = next(\n            (hw for hw in hardware_ids if hw.lower() == requested.lower()),\n            None,\n        )\n        if selected is None:\n            raise ValueError(\n                f\"Hardware {requested!r} is not available for this model. \"\n                f\"Available: {', '.join(hardware_ids)}\"\n            )\n        return selected, by_hardware[selected]\n\n    print(\"\\nAvailable hardware:\")\n    selected = choose_from_menu(hardware_ids, lambda value: value, \"Select hardware: \")\n    return selected, by_hardware[selected]\n\n\ndef strategy_sources(\n    api_base: str, hardware_json_url: str, recipe: dict[str, Any]\n) -> tuple[str, dict[str, str]]:\n    recommended = recipe.get(\"strategy\")\n    if not isinstance(recommended, str) or not recommended:\n        raise ValueError(\n            \"Hardware recipe JSON does not contain a usable `strategy` field.\"\n        )","sourceCodeStart":235,"sourceCodeEnd":271,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/tools/recipes/recipe_json_to_vllm_config.py#L235-L271","documentation":"After a model is selected, select_hardware() validates the --hardware flag against the hardware ids the model's recipe JSON actually offers (case-insensitive). An explicit request matching none of them raises ValueError listing the available ids.","triggerScenarios":"Passing --hardware h100 when the chosen model's recipes only cover e.g. a100, b200, mi300; using a marketing GPU name instead of the catalog's id.","commonSituations":"Assuming a model has a recipe for your GPU when only other SKUs were benchmarked; hardware id spelling/case mismatch not caught by the case-insensitive compare (e.g. 'h100-80gb' vs 'h100').","solutions":["Pick one of the ids listed in the error message (e.g. --hardware a100).","Run without --hardware to see the interactive hardware menu for that model.","If your GPU is missing, choose the closest available recipe and adapt the config manually."],"exampleFix":"# before\npython tools/recipes/recipe_json_to_vllm_config.py --model \"llama 3.1\" --hardware h100\n# -> ValueError: Hardware 'h100' is not available ... Available: a100, b200\n\n# after\npython tools/recipes/recipe_json_to_vllm_config.py --model \"llama 3.1\" --hardware a100","handlingStrategy":"validation","validationCode":"hardware_ids = sorted(by_hardware)\nif args.hardware and args.hardware.lower() not in {h.lower() for h in hardware_ids}:\n    raise SystemExit(f\"Unknown hardware {args.hardware!r}; available: {', '.join(hardware_ids)}\")","typeGuard":"def is_known_hardware(requested: str, by_hardware: dict[str, str]) -> bool:\n    return requested.lower() in {h.lower() for h in by_hardware}","tryCatchPattern":null,"preventionTips":["Fetch the model's hardware list first and validate --hardware against it.","Copy hardware ids verbatim from the tool's error messages or the recipe JSON."],"tags":["cli","recipes","hardware","validation","tooling"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}