langgenius/dify · error · AppUnavailableError
app_unavailable
app_unavailable
Error message
App unavailable, please check your app configurations.
What it means
Raised by _transcribe_audio_to_text when AudioService raises services.errors.app_model_config.AppModelConfigBrokenError — the app's stored model configuration JSON is malformed or references a non-existent model. The controller logs the exception and translates it to AppUnavailableError (400, error_code 'app_unavailable').
Source
Thrown at api/controllers/console/app/audio.py:153
if agent_soul is None:
response = AudioService.transcript_asr(
app_model=app_model,
file=file,
session=session,
end_user=None,
)
else:
response = AudioService.transcript_agent_asr(
app_model=app_model,
agent_soul=agent_soul,
file=file,
session=session,
end_user=None,
)
return dump_response(AudioTranscriptResponse, response)
except services.errors.app_model_config.AppModelConfigBrokenError:
logger.exception("App model config broken.")
raise AppUnavailableError()
except NoAudioUploadedServiceError:
raise NoAudioUploadedError()
except AudioTooLargeServiceError as e:
raise AudioTooLargeError(str(e))
except UnsupportedAudioTypeServiceError:
raise UnsupportedAudioTypeError()
except ProviderNotSupportSpeechToTextServiceError:
raise ProviderNotSupportSpeechToTextError()
except SpeechToTextDisabledServiceError:
raise SpeechToTextDisabledError()
except ProviderTokenNotInitError as ex:
raise ProviderNotInitializeError(ex.description)
except QuotaExceededError:
raise ProviderQuotaExceededError()
except ModelCurrentlyNotSupportError:
raise ProviderModelCurrentlyNotSupportError()
except InvokeError as e:
raise CompletionRequestError(e.description)View on GitHub (pinned to ef8544b173)
Solutions
- Open the app in the console and re-save the model configuration to regenerate a valid model_config.
- Re-select the speech-to-text model in the app settings to refresh model_dict.
- If the app is beyond repair, export the DSL, fix the model section, and re-import.
- Inspect the app_model_config row in the DB for malformed JSON if you have admin access.
Defensive patterns
Strategy: try-catch
Try / catch
try { await axios.post(`/apps/${id}/audio-to-text`, form); }
catch (e) { if (e.code === 'app_unavailable') { /* prompt user to re-save model config in the app */ } } Prevention
- Re-save the app model configuration after upgrades or provider changes.
- Re-select the speech-to-text model when swapping providers.
- Export/inspect the DSL if the app config becomes suspect.
When it happens
Trigger: Calling POST /console/apps/{app_id}/audio-to-text (or /agent/{agent_id}/audio-to-text) on an app whose model_config is corrupt: missing fields, invalid JSON, or a model_dict pointing at a deleted provider/model.
Common situations: App migrated between Dify versions where the config schema changed and no migration ran; manually edited model config; provider/model referenced in config was removed; legacy app never had its config upgraded.
Related errors
- unsupported_audio_type
- provider_not_support_speech_to_text
- provider_quota_exceeded
- model_currently_not_support
- completion_request_error
AI-assisted analysis of langgenius/dify@ef8544b173 (2026-08-12).
Data as JSON: /api/errors/e117282966c99047.
Report an issue: GitHub.