vllm-project/vllm · error · ValueError

Model {model.get('hf_id')!r} has no rendered recommended_com

Error message

Model {model.get('hf_id')!r} has no rendered recommended_command in the Recipes API.

What it means

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.

Source

Thrown at tools/recipes/recipe_json_to_vllm_config.py:354

    models_data = load_json(models_url)
    if not isinstance(models_data, list):
        raise ValueError(f"{models_url} did not return a model list.")

    models = [model for model in models_data if isinstance(model, dict)]
    model = select_model(models, requested_model)

    model_json_path = model.get("json")
    if not isinstance(model_json_path, str) or not model_json_path:
        raise ValueError(f"Selected model {model.get('hf_id')!r} has no JSON API path.")

    model_json_url = api_url(api_base, model_json_path)
    model_data = load_json(model_json_url)
    if not isinstance(model_data, dict):
        raise ValueError(f"{model_json_url} did not return a JSON object.")

    recommended = model_data.get("recommended_command")
    if not isinstance(recommended, dict):
        raise ValueError(
            f"Model {model.get('hf_id')!r} has no rendered "
            "recommended_command in the Recipes API."
        )

    raw_by_hardware = recommended.get("by_hardware")
    if not isinstance(raw_by_hardware, dict) or not raw_by_hardware:
        raise ValueError(
            f"Model {model.get('hf_id')!r} has no per-hardware renderings "
            "in recommended_command.by_hardware."
        )

    by_hardware = {
        str(hw): path
        for hw, path in raw_by_hardware.items()
        if isinstance(path, str) and path
    }
    if not by_hardware:
        raise ValueError(

View on GitHub (pinned to c794754062)

Solutions

  1. curl the model JSON URL and confirm recommended_command exists and is an object
  2. Pick the hardware JSON path manually from the payload (if discoverable) and pass it as the positional source
  3. Update the vllm checkout so the converter's expectations match the deployed API version
  4. If you operate the API, ensure the model has a rendered recommended_command
Defensive patterns

Strategy: validation

Validate before calling

rc = model_data.get("recommended_command")
if not isinstance(rc, dict):
    raise SystemExit(f"model {model_id} has no recommended_command object")

Type guard

def has_recommended_command(model_data: dict) -> bool:
    return isinstance(model_data.get("recommended_command"), dict)

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of vllm-project/vllm@c794754062 (2026-08-14). Data as JSON: /api/errors/7352bd34317305f3. Report an issue: GitHub.