{"record":{"id":"9757c3e25e95974e","repo":"vllm-project/vllm","slug":"token-is-missing-its-value","errorCode":null,"errorMessage":"{token} is missing its value","messagePattern":"(.+?) is missing its value","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"tools/recipes/recipe_json_to_vllm_config.py","lineNumber":496,"sourceCode":"        # -O3 / -O=3\n        if token.startswith(\"-O\") and token != \"-O\":\n            value = token[3:] if token.startswith(\"-O=\") else token[2:]\n            merge_value(config, [\"optimization-level\"], coerce(value))\n            i += 1\n            continue\n\n        # -O 3\n        if token == \"-O\":\n            if i + 1 >= len(argv):\n                raise ValueError(\"-O is missing its value\")\n            merge_value(config, [\"optimization-level\"], coerce(argv[i + 1]))\n            i += 2\n            continue\n\n        # Selected common short aliases.\n        if token in SHORT_ALIASES:\n            if i + 1 >= len(argv):\n                raise ValueError(f\"{token} is missing its value\")\n            merge_value(\n                config,\n                [SHORT_ALIASES[token]],\n                coerce(argv[i + 1]),\n            )\n            i += 2\n            continue\n\n        if not token.startswith(\"--\"):\n            raise ValueError(\n                f\"Unexpected positional/short argument {token!r}. \"\n                \"The converter expects Recipes to emit long-form vLLM serve options.\"\n            )\n\n        # --key=value\n        if \"=\" in token:\n            key, raw_value = token[2:].split(\"=\", 1)\n            merge_value(config, normalize_key(key), coerce(raw_value))","sourceCodeStart":478,"sourceCodeEnd":514,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/tools/recipes/recipe_json_to_vllm_config.py#L478-L514","documentation":"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'.","triggerScenarios":"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.","commonSituations":"Same class as error 149: values lost during JSON rendering or manual editing; fixtures that list flags without values.","solutions":["jq '.argv' recipe.json and inspect the tail of the array","Add the missing value (e.g. '-tp','2') or convert to the long form '--tensor-parallel-size=2'","Re-fetch the recipe from the API if the rendered argv is genuinely truncated, and report it"],"exampleFix":"# before\n\"argv\": [\"vllm\", \"serve\", \"m\", \"--dtype\", \"auto\", \"-tp\"]\n# after\n\"argv\": [\"vllm\", \"serve\", \"m\", \"--dtype\", \"auto\", \"--tensor-parallel-size=2\"]","handlingStrategy":"validation","validationCode":"VALUE_FLAGS = {\"-O\", \"-tp\", \"-pp\", \"-dp\"}\nargv = [str(x) for x in recipe[\"argv\"]]\nbad = [t for i, t in enumerate(argv) if t in VALUE_FLAGS and i + 1 >= len(argv)]\nif bad:\n    raise SystemExit(f\"flags missing values: {bad}\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Normalize generated argv to long-form --key=value pairs before conversion","Keep SHORT_ALIASES (in the tool) in mind when authoring short-form recipes"],"tags":["vllm-recipes","argv-parsing","parallelism"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}