tinyhumansai/openhuman · warning

missing value for --model

Error message

missing value for --model

What it means

Thrown by parse_dump_all_flags when `--model`/`-m` is the last token of `openhuman agent dump-all`, so no value token follows to read as the model name.

Source

Thrown at src/core/agent_cli.rs:84

        match args[i].as_str() {
            "--out" | "-o" => {
                out = Some(PathBuf::from(
                    args.get(i + 1)
                        .ok_or_else(|| anyhow!("missing value for --out"))?,
                ));
                i += 2;
            }
            "--workspace" | "-w" => {
                workspace = Some(PathBuf::from(
                    args.get(i + 1)
                        .ok_or_else(|| anyhow!("missing value for --workspace"))?,
                ));
                i += 2;
            }
            "--model" | "-m" => {
                model = Some(
                    args.get(i + 1)
                        .ok_or_else(|| anyhow!("missing value for --model"))?
                        .clone(),
                );
                i += 2;
            }
            "-v" | "--verbose" => {
                verbose = true;
                i += 1;
            }
            "-h" | "--help" => {
                println!("Usage: openhuman agent dump-all --out <dir> [--workspace <path>] [--model <name>] [-v]");
                println!();
                println!("Render every registered agent's turn-1 system prompt into <dir>.");
                println!("`integrations_agent` is expanded into one file per currently-connected");
                println!("Composio toolkit; if no toolkit is connected, it is skipped.");
                std::process::exit(0);
            }
            other => return Err(anyhow!("unknown dump-all arg: {other}")),
        }

View on GitHub (pinned to a221052e0d)

Solutions

  1. Drop the trailing `--model` (model is optional) or provide a model id, e.g. `--model claude-sonnet-4`.
  2. Quote and default model variables in wrappers so the flag never dangles.

Example fix

# before
openhuman agent dump-all --out ./p --model

# after
openhuman agent dump-all --out ./p --model gpt-5
Defensive patterns

Strategy: validation

Validate before calling

# append --model only when provided
CMD=(openhuman agent dump-all --out "$OUT_DIR")
[ -n "${MODEL:-}" ] && CMD+=(--model "$MODEL")
"${CMD[@]}"

Try / catch

match run_agent_command(&args) {
    Err(e) if e.to_string().contains("missing value for --model") => {
        eprintln!("--model needs a model id after it (or omit the flag)");
    }
    other => other?,
}

Prevention

When it happens

Trigger: `openhuman agent dump-all --out d --model` as the end of the command line.

Common situations: Appending an optional model override from an empty shell variable, or pausing mid-command and submitting early.

Related errors


AI-assisted analysis of tinyhumansai/openhuman@a221052e0d (2026-08-16). Data as JSON: /api/errors/0d77165473c5ae43. Report an issue: GitHub.