Hmbown/CodeWhale · error
invalid --set provider (value omitted)
Error message
invalid --set provider (value omitted)
What it means
`--set provider=...` requires a value after the `=`. split_once('=') fails when no '=' or no value is present; once a value exists it must parse as a known provider identifier via parse_provider_identifier, otherwise this error is thrown (message text mentions 'value omitted' but it also fires on unparseable provider names).
Solutions
- Supply the full form: --set provider=<valid-provider-id>
- Check `codewhale provider list` (or config docs) for the exact accepted identifiers
- Fix typos (e.g. 'antigrvity' -> correct id)
- Use the dedicated provider option or `config set` for non-runtime keys
Example fix
// before $ codewhale --set provider myprovider // after $ codewhale --set provider=openai
Defensive patterns
Strategy: validation
Validate before calling
// shell-side guard before invoking
[[ "$setval" == provider=* && -n "${setval#provider=}" ]] || { echo "usage: --set provider=<id>"; exit 2; } Try / catch
match cli.run() {
Err(e) if e.to_string().starts_with("invalid --set provider") => {
eprintln!("use --set provider=<valid-id>; see `codewhale provider list`");
}
other => other?,
} Prevention
- Always use KEY=VALUE form with a non-empty value for --set
- Validate provider ids against `codewhale provider list` output in scripts
- Quote the whole --set argument when values may contain shell metacharacters
When it happens
Trigger: Running `codewhale ... --set provider` (no '='), `--set provider=` (empty value), or `--set provider=not-a-provider` with an unrecognized identifier.
Common situations: Typo'd provider name, forgetting the value entirely, or using a legacy/renamed provider id after a version change.
Understand the failure class
Background: "Unknown argument", "Invalid value", and "must be one of": invalid CLI argument errors explained — this error's family across 35 libraries.
Related errors
- account_agent_model_unconfigured
- --attempts must be an integer from 1 to 20
- bundle at is bytes; the limit is bytes
- bundle at is bytes; the limit is bytes
- cannot resolve the current Codewhale route
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/5c38b9c94139a194.
Report an issue: GitHub.
Appendix: source
Thrown at crates/cli/src/lib.rs:1902
}
explicit_path
}
/// Runtime `--set` uses the dedicated flag handoff, so the existing loader
/// owns profile, provider, managed-policy and requirements precedence. Keep
/// config read/write commands on their separate, never-saved store overlay.
fn apply_runtime_set_overrides(cli: &mut Cli) -> Result<()> {
let mut values = CliRuntimeOverrides::default();
let mut provider = None;
for spec in &cli.overrides {
let (key, value) = spec
.split_once('=')
.context("invalid --set: expected KEY=VALUE (value omitted)")?;
match key.trim() {
"provider" => {
provider = Some(
parse_provider_identifier(value)
.map_err(|_| anyhow!("invalid --set provider (value omitted)"))?,
);
}
"model" | "default_text_model" => values.model = Some(value.to_string()),
"verbosity" => values.verbosity = Some(value.to_string()),
"approval_policy" => values.approval_policy = Some(value.to_string()),
"sandbox_mode" => values.sandbox_mode = Some(value.to_string()),
"telemetry" => {
let mut config = ConfigToml::default();
config
.set_value("telemetry", value)
.map_err(|_| anyhow!("invalid --set telemetry: expected a boolean"))?;
values.telemetry = config.telemetry;
}
_ => bail!(
"unsupported runtime --set key (value omitted): supported keys are provider, \
model, default_text_model, verbosity, approval_policy, sandbox_mode and \
telemetry; use the dedicated option or config set for other keys"
),View on GitHub (pinned to 73e0f67d83)