moeru-ai/airi · error
MiMo transcription failed: ${response.status} ${response.sta
Error message
MiMo transcription failed: ${response.status} ${response.statusText}${errorBody ? ` — ${errorBody}` : ''} What it means
The MiMo adapter converts the audio to base64 and posts to MiMo's chat/completions endpoint. If that upstream HTTP response is not ok (non-2xx), it surfaces the status, statusText, and any response body as this error. It is an upstream API failure relayed to the caller.
Source
Thrown at packages/provider-inference/src/providers/cloud/mimo-audio/index.ts:199
const dataUri = await readBlobAsDataUri(file)
const base64Data = dataUri.split(',')[1]
const response = await fetch(new URL('chat/completions', baseUrl), {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'api-key': apiKey },
body: JSON.stringify({
model: modelName,
messages: [{
role: 'user',
content: [
{ type: 'text', text: 'Transcribe the audio content.' },
{ type: 'input_audio', input_audio: { data: base64Data, format: audioFormatFromDataUri(dataUri) } },
],
}],
}),
})
if (!response.ok) {
const errorBody = await response.text().catch(() => '')
throw new Error(`MiMo transcription failed: ${response.status} ${response.statusText}${errorBody ? ` — ${errorBody}` : ''}`)
}
const data = await response.json() as { choices?: Array<{ message?: { content?: string } }> }
return new Response(JSON.stringify({ text: data.choices?.[0]?.message?.content || '' }), {
status: 200,
headers: { 'Content-Type': 'application/json' },
})
},
}),
}
}
export const providerMimoAudioSpeech = defineProvider<MimoSpeechConfig, 'mimo-audio-speech'>({
id: 'mimo-audio-speech',
name: 'Xiaomi MiMo',
nameLocalize: ({ t }) => t('settings.pages.providers.provider.mimo.title'),
description: 'api.xiaomimimo.com',
descriptionLocalize: ({ t }) => t('settings.pages.providers.provider.mimo.description'),View on GitHub (pinned to f679616c34)
Solutions
- Read the error message body — it contains MiMo's own error JSON explaining the cause.
- Verify the API key and that it has access to the transcription/audio model.
- Confirm the model id passed to transcription() is valid for MiMo.
- Check the audio size/encoding; re-encode to a supported format (e.g. wav/mp3) and retry.
- Retry with backoff on 429/5xx.
Defensive patterns
Strategy: retry
Validate before calling
if (!apiKey) throw new Error('MiMo API key required before transcription') Try / catch
try { await transcribe(model, audio) } catch (e) {
if (/MiMo transcription failed: (429|5\d\d)/.test(e.message)) await backoffRetry()
else if (/401|403/.test(e.message)) notifyInvalidApiKey()
else throw e
} Prevention
- Validate API key before calls
- Keep audio within size limits and supported formats
- Retry 429/5xx with exponential backoff
- Surface the embedded upstream error body to logs
When it happens
Trigger: MiMo's chat/completions endpoint returns 401 (bad API key), 400 (invalid model name or malformed audio payload), 413 (audio too large), 429 (rate limit), or 5xx (service outage).
Common situations: Expired or wrong API key; unsupported or mistyped model passed to transcription(model); audio format MiMo cannot decode; network proxy returning errors; MiMo capacity issues producing 5xx.
Related errors
- MiniMax TTS request failed: ${response.status} ${response.st
- OpenRouter audio request failed: ${response.status} ${await
- MiMo transcription failed: ${response.status} ${response.sta
- Speech engine answered ${response.status} ${response.statusT
- Streaming transcription request failed with status ${respons
AI-assisted analysis of moeru-ai/airi@f679616c34 (2026-09-08).
Data as JSON: /api/errors/0252b292ca5c90a0.
Report an issue: GitHub.