Hmbown/CodeWhale · error

Failed to update setting: invalid model '{value}'. Expected:

Error message

Failed to update setting: invalid model '{value}'. Expected: auto, a DeepSeek model ID (for example deepseek-v4-pro, deepseek-v4-flash), or none/default.

What it means

Settings update validation for the default-model key: the value is not one of the none/default sentinels and normalize_default_model did not recognize it as `auto` or a known DeepSeek model id. The examples in the message reflect the accepted families; anything else would strand the session on an invalid model string.

Source

Thrown at crates/tui/src/settings.rs:1469

                        "Failed to update setting: invalid max history '{value}'. Expected a positive number."
                    )
                })?;
                self.max_input_history = max;
            }
            "default_model" | "model" => {
                let trimmed = value.trim();
                if trimmed.is_empty()
                    || matches!(
                        trimmed.to_ascii_lowercase().as_str(),
                        "none" | "default" | "(default)"
                    )
                {
                    self.default_model = None;
                    return Ok(());
                }

                let Some(model) = normalize_default_model(trimmed) else {
                    anyhow::bail!(
                        "Failed to update setting: invalid model '{value}'. Expected: auto, a DeepSeek model ID (for example deepseek-v4-pro, deepseek-v4-flash), or none/default."
                    );
                };
                self.default_model = Some(model);
            }
            "reasoning_effort" | "effort" => {
                self.reasoning_effort = normalize_reasoning_effort_setting(value)?;
            }
            "permission_posture" | "permissions" => {
                self.permission_posture = normalize_permission_posture(value);
                if self.permission_posture.is_none() {
                    anyhow::bail!(
                        "Failed to update setting: invalid permission posture '{value}'. Expected: ask, auto-review, or full-access."
                    );
                }
            }
            "sandbox_mode" | "sandbox" | "filesystem_sandbox" => {
                self.sandbox_mode = normalize_sandbox_mode(value);

View on GitHub (pinned to 0c42157ee5)

Solutions

  1. Use auto, a valid DeepSeek model id, or none/default
  2. Check available model ids for the provider
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/tui/src/settings.rs:1469 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20). Data as JSON: /api/errors/f85ad18b923b3a64. Report an issue: GitHub.