{"record":{"id":"7352bd34317305f3","repo":"vllm-project/vllm","slug":"model-model-get-hf-id-r-has-no-rendered-recom","errorCode":null,"errorMessage":"Model {model.get('hf_id')!r} has no rendered recommended_command in the Recipes API.","messagePattern":"Model (.+?) has no rendered recommended_command in the Recipes API\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"tools/recipes/recipe_json_to_vllm_config.py","lineNumber":354,"sourceCode":"    models_data = load_json(models_url)\n    if not isinstance(models_data, list):\n        raise ValueError(f\"{models_url} did not return a model list.\")\n\n    models = [model for model in models_data if isinstance(model, dict)]\n    model = select_model(models, requested_model)\n\n    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(","sourceCodeStart":336,"sourceCodeEnd":372,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/tools/recipes/recipe_json_to_vllm_config.py#L336-L372","documentation":"The per-model recipe JSON object was fetched, but its 'recommended_command' field is missing or not a dict. The converter needs the nested recommended_command.by_hardware mapping to find per-hardware renderings, so a missing/malformed block stops discovery before hardware selection.","triggerScenarios":"Model JSON exists as an object but predates the recommended_command schema, or the block was renamed/restructured server-side; also triggered by a minimal hand-written model JSON used for testing that only includes other fields.","commonSituations":"API version skew (server newer or older than the tool expects); model published without a recommended command rendering; third-party Recipes-compatible servers that implement only part of the schema.","solutions":["curl the model JSON URL and confirm recommended_command exists and is an object","Pick the hardware JSON path manually from the payload (if discoverable) and pass it as the positional source","Update the vllm checkout so the converter's expectations match the deployed API version","If you operate the API, ensure the model has a rendered recommended_command"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"rc = model_data.get(\"recommended_command\")\nif not isinstance(rc, dict):\n    raise SystemExit(f\"model {model_id} has no recommended_command object\")","typeGuard":"def has_recommended_command(model_data: dict) -> bool:\n    return isinstance(model_data.get(\"recommended_command\"), dict)","tryCatchPattern":null,"preventionTips":["Snapshot representative model JSONs as fixtures and assert their shape in tests","Treat missing recommended_command as an API-side data issue and report it rather than patching around it"],"tags":["vllm-recipes","api-discovery","schema-validation"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}