vllm-project/vllm · error · ValueError

{token} is missing its value

Error message

{token} is missing its value

What it means

argv_to_config() recognizes three short aliases (-tp, -pp, -dp mapping to tensor/pipeline/data-parallel-size). If such a token is the last element of argv, its required value token is missing and parsing fails with '{token} is missing its value'.

Source

Thrown at tools/recipes/recipe_json_to_vllm_config.py:496

        # -O3 / -O=3
        if token.startswith("-O") and token != "-O":
            value = token[3:] if token.startswith("-O=") else token[2:]
            merge_value(config, ["optimization-level"], coerce(value))
            i += 1
            continue

        # -O 3
        if token == "-O":
            if i + 1 >= len(argv):
                raise ValueError("-O is missing its value")
            merge_value(config, ["optimization-level"], coerce(argv[i + 1]))
            i += 2
            continue

        # Selected common short aliases.
        if token in SHORT_ALIASES:
            if i + 1 >= len(argv):
                raise ValueError(f"{token} is missing its value")
            merge_value(
                config,
                [SHORT_ALIASES[token]],
                coerce(argv[i + 1]),
            )
            i += 2
            continue

        if not token.startswith("--"):
            raise ValueError(
                f"Unexpected positional/short argument {token!r}. "
                "The converter expects Recipes to emit long-form vLLM serve options."
            )

        # --key=value
        if "=" in token:
            key, raw_value = token[2:].split("=", 1)
            merge_value(config, normalize_key(key), coerce(raw_value))

View on GitHub (pinned to c794754062)

Solutions

  1. jq '.argv' recipe.json and inspect the tail of the array
  2. Add the missing value (e.g. '-tp','2') or convert to the long form '--tensor-parallel-size=2'
  3. Re-fetch the recipe from the API if the rendered argv is genuinely truncated, and report it

Example fix

# before
"argv": ["vllm", "serve", "m", "--dtype", "auto", "-tp"]
# after
"argv": ["vllm", "serve", "m", "--dtype", "auto", "--tensor-parallel-size=2"]
Defensive patterns

Strategy: validation

Validate before calling

VALUE_FLAGS = {"-O", "-tp", "-pp", "-dp"}
argv = [str(x) for x in recipe["argv"]]
bad = [t for i, t in enumerate(argv) if t in VALUE_FLAGS and i + 1 >= len(argv)]
if bad:
    raise SystemExit(f"flags missing values: {bad}")

Prevention

When it happens

Trigger: Recipe argv ending in '-tp', '-pp', or '-dp' with no following token; renderer dropped a null numeric value; truncated copy-paste of a recipe command.

Common situations: Same class as error 149: values lost during JSON rendering or manual editing; fixtures that list flags without values.

Related errors


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