{"record":{"id":"f85ad18b923b3a64","repo":"Hmbown/CodeWhale","slug":"failed-to-update-setting-invalid-model-value","errorCode":null,"errorMessage":"Failed to update setting: invalid model '{value}'. Expected: auto, a DeepSeek model ID (for example deepseek-v4-pro, deepseek-v4-flash), or none/default.","messagePattern":"Failed to update setting: invalid model '(.+?)'\\. Expected: auto, a DeepSeek model ID \\(for example deepseek-v4-pro, deepseek-v4-flash\\), or none/default\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/settings.rs","lineNumber":1469,"sourceCode":"                        \"Failed to update setting: invalid max history '{value}'. Expected a positive number.\"\n                    )\n                })?;\n                self.max_input_history = max;\n            }\n            \"default_model\" | \"model\" => {\n                let trimmed = value.trim();\n                if trimmed.is_empty()\n                    || matches!(\n                        trimmed.to_ascii_lowercase().as_str(),\n                        \"none\" | \"default\" | \"(default)\"\n                    )\n                {\n                    self.default_model = None;\n                    return Ok(());\n                }\n\n                let Some(model) = normalize_default_model(trimmed) else {\n                    anyhow::bail!(\n                        \"Failed to update setting: invalid model '{value}'. Expected: auto, a DeepSeek model ID (for example deepseek-v4-pro, deepseek-v4-flash), or none/default.\"\n                    );\n                };\n                self.default_model = Some(model);\n            }\n            \"reasoning_effort\" | \"effort\" => {\n                self.reasoning_effort = normalize_reasoning_effort_setting(value)?;\n            }\n            \"permission_posture\" | \"permissions\" => {\n                self.permission_posture = normalize_permission_posture(value);\n                if self.permission_posture.is_none() {\n                    anyhow::bail!(\n                        \"Failed to update setting: invalid permission posture '{value}'. Expected: ask, auto-review, or full-access.\"\n                    );\n                }\n            }\n            \"sandbox_mode\" | \"sandbox\" | \"filesystem_sandbox\" => {\n                self.sandbox_mode = normalize_sandbox_mode(value);","sourceCodeStart":1451,"sourceCodeEnd":1487,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/settings.rs#L1451-L1487","documentation":"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.","triggerScenarios":"Thrown at crates/tui/src/settings.rs:1469 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use auto, a valid DeepSeek model id, or none/default","Check available model ids for the provider"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}