{"record":{"id":"f1b6c1f6aacb89b0","repo":"vllm-project/vllm","slug":"hardware-json-url-did-not-return-a-json-object","errorCode":null,"errorMessage":"{hardware_json_url} did not return a JSON object.","messagePattern":"(.+?) did not return a JSON object\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"tools/recipes/recipe_json_to_vllm_config.py","lineNumber":380,"sourceCode":"            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\n    print(\"\\nResolved recipe:\")\n    print(f\"  Model:    {model.get('hf_id')}\")\n    print(f\"  Hardware: {hardware}\")\n    print(f\"  Strategy: {strategy}\")\n    print(f\"  JSON:     {resolved}\")\n    print()\n\n    return resolved","sourceCodeStart":362,"sourceCodeEnd":398,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/tools/recipes/recipe_json_to_vllm_config.py#L362-L398","documentation":"A hardware was selected from by_hardware and its JSON URL fetched, but the response parsed to a non-object (list/string/number/null). The per-hardware recipe must be a JSON object for the subsequent select_strategy() step, so the tool aborts.","triggerScenarios":"The by_hardware path points at a list endpoint or returns a bare string (e.g. a rendered command line instead of a document); stale path after the API reorganized its URL layout; proxy interference mangling the response.","commonSituations":"Recipes API URL restructuring; per-hardware rendering format change; caching layer serving wrong content type for the path.","solutions":["curl the exact hardware_json_url from the error message and check the JSON top-level type","Verify the path in by_hardware is current for your --api-base (paths and base must come from the same API generation)","Update the vllm checkout, or hand-fetch a valid hardware recipe JSON and pass it positionally"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"hw_data = json.load(urllib.request.urlopen(hardware_json_url))\nif not isinstance(hw_data, dict):\n    raise SystemExit(f\"{hardware_json_url} is {type(hw_data).__name__}, expected object\")","typeGuard":"def is_json_object(x: object) -> bool:\n    return isinstance(x, dict)","tryCatchPattern":null,"preventionTips":["Smoke-test each hop of a multi-hop discovery chain with curl before automating it","Keep --api-base and all referenced paths from the same API generation"],"tags":["vllm-recipes","api-discovery","json-shape"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}