Hmbown/CodeWhale · error · anyhow::Error
`speech` requires provider = "xiaomi-mimo" (current: {}). Ru
Error message
`speech` requires provider = "xiaomi-mimo" (current: {}). Run with `--provider xiaomi-mimo` or set it in config. What it means
The `speech` subcommand is wired only to the Xiaomi MiMo TTS API. Before building any request it asserts config.api_provider() == ApiProvider::XiaomiMimo and bails with the current provider's name plus the two remediation paths: the `--provider xiaomi-mimo` flag or a config change. No network I/O happens before this check.
Source
Thrown at crates/tui/src/lib.rs:7355
default_speech_output_name, describe_speech_voice, encode_voice_clone_sample_data_uri,
infer_speech_model, normalize_speech_format,
};
let SpeechArgs {
text,
output,
output_dir,
model,
voice,
instruction,
voice_prompt,
clone_voice,
format,
json: json_output,
} = args;
if config.api_provider() != ApiProvider::XiaomiMimo {
bail!(
"`speech` requires provider = \"xiaomi-mimo\" (current: {}). Run with `--provider xiaomi-mimo` or set it in config.",
config.api_provider().as_str()
);
}
if text.trim().is_empty() {
bail!("Speech text cannot be empty");
}
let voice_is_data_uri = voice
.as_deref()
.map(str::trim)
.is_some_and(|value| value.starts_with("data:audio/"));
if clone_voice.is_some() && voice.is_some() {
bail!("Use either --clone-voice or --voice for cloned voice data, not both");
}
let model = infer_speech_model(
model.as_deref(),
clone_voice.is_some() || voice_is_data_uri,View on GitHub (pinned to 0c42157ee5)
Solutions
- Add `--provider xiaomi-mimo` to the speech invocation
- Or set provider = "xiaomi-mimo" in the config that speech runs under
- Confirm the active provider afterwards with `codewhale doctor`
Example fix
// before $ codewhale speech ... Error: `speech` requires provider = "xiaomi-mimo" (current: deepseek). Run with `--provider xiaomi-mimo` or set it in config. // after $ codewhale speech --provider xiaomi-mimo ...
Defensive patterns
Strategy: validation
Validate before calling
# pin the provider explicitly so config drift cannot break speech jobs exec codewhale speech --provider xiaomi-mimo "$@"
Prevention
- Always pass --provider explicitly for speech in scripts and aliases
- Document that speech is MiMo-only next to any provider-switching runbook
When it happens
Trigger: Running `codewhale speech ...` while the active config's api_provider resolves to anything other than xiaomi-mimo (e.g. a chat-provider default). The check is the first thing after argument destructuring.
Common situations: A config.toml defaulting to the chat provider for coding work; switching providers globally and forgetting speech is MiMo-only; a fresh machine where the default provider was never changed.
Related errors
- invalid value '{provider}' for '--provider <PROVIDER>': expe
- speech synthesis requires provider 'xiaomi-mimo' (current: {
- Unrecognized --provider {provider_arg:?}. Known providers: {
- Use either --clone-voice or --voice for cloned voice data, n
- speech requires a TTS model (examples: {}); got {model}
AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20).
Data as JSON: /api/errors/c85cdbbdda5a7f06.
Report an issue: GitHub.