{"record":{"id":"52b54f7a0b8535b5","repo":"vercel/ai","slug":"imagemodel-52b54f","errorCode":null,"errorMessage":"imageModel","messagePattern":"imageModel","errorType":"exception","errorClass":"NoSuchModelError","httpStatus":null,"severity":"error","filePath":"packages/assemblyai/src/assemblyai-provider.ts","lineNumber":103,"sourceCode":"  provider.specificationVersion = 'v4' as const;\n  provider.transcription = createTranscriptionModel;\n  provider.transcriptionModel = createTranscriptionModel;\n\n  provider.languageModel = () => {\n    throw new NoSuchModelError({\n      modelId: 'unknown',\n      modelType: 'languageModel',\n      message: 'AssemblyAI does not provide language models',\n    });\n  };\n\n  provider.embeddingModel = (modelId: string) => {\n    throw new NoSuchModelError({ modelId, modelType: 'embeddingModel' });\n  };\n  provider.textEmbeddingModel = provider.embeddingModel;\n\n  provider.imageModel = (modelId: string) => {\n    throw new NoSuchModelError({ modelId, modelType: 'imageModel' });\n  };\n\n  return provider as AssemblyAIProvider;\n}\n\n/**\n * Default AssemblyAI provider instance.\n */\nexport const assemblyai = createAssemblyAI();\n","sourceCodeStart":85,"sourceCodeEnd":113,"githubUrl":"https://github.com/vercel/ai/blob/69428b1f8b037e4d118fb4853428d5c4e620493c/packages/assemblyai/src/assemblyai-provider.ts#L85-L113","documentation":"AssemblyAI's `imageModel` factory is a stub that throws NoSuchModelError with modelType 'imageModel' for any modelId. The provider supports only transcription models, so image requests always fail.","triggerScenarios":"Calling `assemblyai.imageModel('any-id')` or passing it to `generateImage({ model: ... })`.","commonSituations":"Misconfigured image-generation pipelines selecting AssemblyAI by mistake; copy-pasted provider setup code listing imageModel for every provider.","solutions":["Use an image-capable provider such as OpenAI (`createOpenAI().image('dall-e-3')`), Google, or Amazon Bedrock.","Restrict AssemblyAI usage to transcription and remove it from image model registries."],"exampleFix":"// before\nconst image = await generateImage({ model: assemblyai.imageModel('x'), prompt });\n// after\nconst image = await generateImage({ model: openai.image('dall-e-3'), prompt });","handlingStrategy":"fallback","validationCode":"if (providerId === 'assemblyai') {\n  throw new Error('AssemblyAI provides no image models; configure an image-capable provider');\n}","typeGuard":"function supportsImages(p: any): boolean {\n  try {\n    p.imageModel?.('probe');\n    return true;\n  } catch (e) {\n    return !(NoSuchModelError.isInstance(e) && e.modelType === 'imageModel');\n  }\n}","tryCatchPattern":"try {\n  return await generateImage({ model: assemblyai.imageModel(id), prompt });\n} catch (error) {\n  if (NoSuchModelError.isInstance(error) && error.modelType === 'imageModel') {\n    return generateImage({ model: openai.image('dall-e-3'), prompt });\n  }\n  throw error;\n}","preventionTips":["Only register AssemblyAI in transcription pipelines, never in image registries.","Use NoSuchModelError.isInstance + modelType checks to surface clear messages.","Audit provider configuration files for capability mismatches."],"tags":["unsupported-model-type","image-generation","provider-capability"],"backgroundTag":"model-type-not-supported","analyzedSha":"69428b1f8b037e4d118fb4853428d5c4e620493c","analyzedAt":"2026-08-30T12:32:21.016Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}