{"record":{"id":"37138966813cda71","repo":"moeru-ai/airi","slug":"invalid-or-missing-transcription-model-please-con","errorCode":null,"errorMessage":"Invalid or missing transcription model. Please configure a valid model in the provider settings.","messagePattern":"Invalid or missing transcription model\\. Please configure a valid model in the provider settings\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/stage-pages/src/pages/settings/providers/transcription/openai-compatible-audio-transcription.vue","lineNumber":89,"sourceCode":"\n// Check if API key is configured\nconst apiKeyConfigured = computed(() => !!providers.value[providerId]?.apiKey)\n\n// Generate transcription\nasync function handleGenerateTranscription(file: File) {\n  const provider = await providersStore.getProviderInstance<TranscriptionProviderWithExtraOptions<string, any>>(providerId)\n  if (!provider)\n    throw new Error('Failed to initialize transcription provider')\n\n  // Get provider configuration\n  const providerConfig = providerStore.getProviderConfig(providerId)\n\n  // Get model from configuration or use the reactive model value\n  const modelToUse = providerConfig.model as string | undefined || model.value\n\n  // Validate model - throw error if no valid model configured\n  if (!modelToUse || !isValidTranscriptionModel(modelToUse)) {\n    throw new Error(`Invalid or missing transcription model. Please configure a valid model in the provider settings.`)\n  }\n\n  return await hearingStore.transcription(\n    providerId,\n    provider,\n    modelToUse,\n    file,\n    'json',\n  )\n}\n\n// Use the composable to get validation logic and state\nconst {\n  t,\n  router,\n  providerMetadata,\n  isValidating,\n  isValid,","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/moeru-ai/airi/blob/677329427f32468c74b17f3ec47eeca4e05bec65/packages/stage-pages/src/pages/settings/providers/transcription/openai-compatible-audio-transcription.vue#L71-L107","documentation":"The openai-compatible transcription page validates the resolved model before calling hearingStore.transcription: modelToUse comes from providerConfig.model, falling back to the reactive model.value, and must pass isValidTranscriptionModel(). That validator accepts known transcription models (whisper-*, gpt-4o-*-transcribe) and custom names, but rejects obvious chat models (names containing 'gpt-4' without 'transcribe'/'whisper'). The error means the resolved model was empty or classified as a chat model.","triggerScenarios":"providerConfig.model and model.value are both empty (no model ever selected/saved), or the saved model is something like 'gpt-4o' / 'gpt-4-turbo' which fails the chat-model rejection branch at openai-compatible-audio-transcription.vue:155.","commonSituations":"User previously saved a chat model on a shared openai-compatible provider config; a fresh install where no default model is set for the openai-compatible provider (unlike the official page it has no hardcoded fallback here); custom endpoint exposing only chat models; stale persisted model value from an older config layout.","solutions":["Open provider settings and pick a valid transcription model (whisper-1, gpt-4o-transcribe, gpt-4o-mini-transcribe, or your endpoint's whisper-compatible name), then save.","If your endpoint uses a custom transcription model name, ensure it does not contain 'gpt-4' without also containing 'transcribe' or 'whisper'.","Persist an explicit default model in the provider's default config so modelToUse is never empty.","Check onMounted's auto-reset (line 172) ran — an invalid persisted model should be reset to 'whisper-1'; if it did not, clear the stored model value and re-select."],"exampleFix":"// before\nconst modelToUse = providerConfig.model as string | undefined || model.value\nif (!modelToUse || !isValidTranscriptionModel(modelToUse)) {\n  throw new Error(`Invalid or missing transcription model. Please configure a valid model in the provider settings.`)\n}\n\n// after — fall back to whisper-1 and warn instead of hard-failing\nconst modelToUse = providerConfig.model as string | undefined || model.value || 'whisper-1'\nif (!isValidTranscriptionModel(modelToUse)) {\n  throw new Error(`Invalid transcription model \"${modelToUse}\". Choose a transcription model (e.g. whisper-1) in provider settings.`)\n}","handlingStrategy":"validation","validationCode":"const modelToUse = providerConfig.model as string | undefined || model.value\nif (!modelToUse || !isValidTranscriptionModel(modelToUse)) {\n  // block generation and prompt model selection; do not call hearingStore.transcription\n}","typeGuard":"function isValidTranscriptionModel(modelName: string | undefined | null): boolean {\n  if (!modelName)\n    return false\n  if (VALID_TRANSCRIPTION_MODELS.includes(modelName))\n    return true\n  if (modelName.includes('gpt-4') && !modelName.includes('transcribe') && !modelName.includes('whisper'))\n    return false\n  return true\n}","tryCatchPattern":"try {\n  await handleGenerateTranscription(file)\n}\ncatch (error) {\n  if (errorMessageFrom(error).includes('Invalid or missing transcription model')) {\n    // focus the model selector in provider settings\n  }\n  throw error\n}","preventionTips":["Validate the model in the settings form on save, not only at generation time.","Default the openai-compatible provider to 'whisper-1' so modelToUse is never empty.","Re-run the onMounted auto-reset check after programmatic config changes."],"tags":["model-validation","configuration","transcription","whisper"],"backgroundTag":"invalid-model-name","analyzedSha":"677329427f32468c74b17f3ec47eeca4e05bec65","analyzedAt":"2026-08-18T17:29:58.153Z","contentChangedAt":"2026-08-18T17:29:58.153Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}