{"record":{"id":"c85cdbbdda5a7f06","repo":"Hmbown/CodeWhale","slug":"speech-requires-provider-xiaomi-mimo-curren","errorCode":null,"errorMessage":"`speech` requires provider = \"xiaomi-mimo\" (current: {}). Run with `--provider xiaomi-mimo` or set it in config.","messagePattern":"`speech` requires provider = \"xiaomi-mimo\" \\(current: (.+?)\\)\\. Run with `--provider xiaomi-mimo` or set it in config\\.","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/lib.rs","lineNumber":7804,"sourceCode":"        default_speech_output_name, describe_speech_voice, encode_voice_clone_sample_data_uri,\n        infer_speech_model, normalize_speech_format,\n    };\n\n    let SpeechArgs {\n        text,\n        output,\n        output_dir,\n        model,\n        voice,\n        instruction,\n        voice_prompt,\n        clone_voice,\n        format,\n        json: json_output,\n    } = args;\n\n    if config.api_provider() != ApiProvider::XiaomiMimo {\n        bail!(\n            \"`speech` requires provider = \\\"xiaomi-mimo\\\" (current: {}). Run with `--provider xiaomi-mimo` or set it in config.\",\n            config.api_provider().as_str()\n        );\n    }\n\n    if text.trim().is_empty() {\n        bail!(\"Speech text cannot be empty\");\n    }\n    let voice_is_data_uri = voice\n        .as_deref()\n        .map(str::trim)\n        .is_some_and(|value| value.starts_with(\"data:audio/\"));\n    if clone_voice.is_some() && voice.is_some() {\n        bail!(\"Use either --clone-voice or --voice for cloned voice data, not both\");\n    }\n    let model = infer_speech_model(\n        model.as_deref(),\n        clone_voice.is_some() || voice_is_data_uri,","sourceCodeStart":7786,"sourceCodeEnd":7822,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/lib.rs#L7786-L7822","documentation":"The `speech` (text-to-speech) subcommand only supports the Xiaomi MiMo provider; it bails when the active API provider in the config is anything else. The message names the required provider value and both ways to set it.","triggerScenarios":"Running the `speech` subcommand while config.api_provider() is not ApiProvider::XiaomiMimo (e.g. another provider is configured or selected via a --provider flag elsewhere).","commonSituations":"A default config pointing at a different provider; forgetting `--provider xiaomi-mimo` on the command line; a config file where api_provider was set for chat but speech was never switched.","solutions":["Re-run with `--provider xiaomi-mimo`","Set provider = \"xiaomi-mimo\" in the config file","Confirm with `codewhale doctor` or config output which provider is currently active"],"exampleFix":"// before\ncodewhale speech --text \"hello\"\n// after\ncodewhale --provider xiaomi-mimo speech --text \"hello\"\n// or in config: provider = \"xiaomi-mimo\"","handlingStrategy":"validation","validationCode":"if config.api_provider() != ApiProvider::XiaomiMimo {\n    eprintln!(\"speech requires provider xiaomi-mimo, got {}\", config.api_provider().as_str());\n    std::process::exit(2);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Match the --provider flag to the subcommand's supported provider","Check current provider via doctor/config before speech commands","Keep speech-specific provider settings in config rather than relying on CLI flags"],"tags":["cli","speech","provider","config"],"backgroundTag":"unsupported-config-value","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}