vllm-project/vllm · error · ValueError

No recipe model matched {requested!r}.

Error message

No recipe model matched {requested!r}.

What it means

select_model() searches the recipe catalog with your --model string; when an explicit (non-interactive) request yields no matches after scoring, it raises ValueError naming the requested string. This only fires when the query came from the CLI — interactive queries loop instead.

Source

Thrown at tools/recipes/recipe_json_to_vllm_config.py:236

            continue
        if 1 <= index <= len(items):
            return items[index - 1]
        print(f"Enter a number from 1 to {len(items)}.")


def select_model(models: list[dict[str, Any]], requested: str | None) -> dict[str, Any]:
    query = requested
    while True:
        if not query:
            query = prompt("Model search (for example: llama 3.1): ")

        matches = search_models(models, query)
        if matches:
            print("\nMatching models:")
            return choose_from_menu(matches, model_label, "Select model: ")

        if requested:
            raise ValueError(f"No recipe model matched {requested!r}.")

        print(f"No recipe model matched {query!r}. Try again.")
        query = None


def select_hardware(
    by_hardware: dict[str, str], requested: str | None
) -> tuple[str, str]:
    hardware_ids = sorted(by_hardware)

    if requested:
        selected = next(
            (hw for hw in hardware_ids if hw.lower() == requested.lower()),
            None,
        )
        if selected is None:
            raise ValueError(
                f"Hardware {requested!r} is not available for this model. "

View on GitHub (pinned to c794754062)

Solutions

  1. Retry with a shorter, canonical fragment of the model name (e.g. 'llama 3.1' or 'qwen 2.5 72b').
  2. Confirm the model is listed in the Recipes API's models.json before requesting it.
  3. Drop --model to enter interactive search and browse what actually matches.

Example fix

# before
python tools/recipes/recipe_json_to_vllm_config.py --model "llamma 3"
# -> ValueError: No recipe model matched 'llamma 3'.

# after
python tools/recipes/recipe_json_to_vllm_config.py --model "llama 3"
Defensive patterns

Strategy: validation

Validate before calling

matches = search_models(models, requested)
if requested and not matches:
    raise SystemExit(f"No recipe model matched {requested!r}; try a shorter query or drop --model")

Try / catch

try:
    model = select_model(models, args.model)
except ValueError as e:
    raise SystemExit(f"model selection failed: {e}") from e

Prevention

When it happens

Trigger: Passing --model with a string that fuzzy-matches nothing in models.json (typpos, unknown model names, or models absent from the recipe catalog).

Common situations: Asking for a newly released or niche model that has no published recipe; HF repo id spelled differently from the catalog's title/hf_id; using an alias the search doesn't know.

Related errors


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