{"record":{"id":"ef071be8d38b0c8d","repo":"vercel/ai","slug":"lmnt-does-not-provide-image-models","errorCode":null,"errorMessage":"LMNT does not provide image models","messagePattern":"LMNT does not provide image models","errorType":"exception","errorClass":"NoSuchModelError","httpStatus":null,"severity":"error","filePath":"packages/lmnt/src/lmnt-provider.ts","lineNumber":99,"sourceCode":"\n  provider.languageModel = (modelId: string) => {\n    throw new NoSuchModelError({\n      modelId,\n      modelType: 'languageModel',\n      message: 'LMNT does not provide language models',\n    });\n  };\n\n  provider.embeddingModel = (modelId: string) => {\n    throw new NoSuchModelError({\n      modelId,\n      modelType: 'embeddingModel',\n      message: 'LMNT does not provide embedding models',\n    });\n  };\n\n  provider.imageModel = (modelId: string) => {\n    throw new NoSuchModelError({\n      modelId,\n      modelType: 'imageModel',\n      message: 'LMNT does not provide image models',\n    });\n  };\n\n  return provider as LMNTProvider;\n}\n\n/**\n * Default LMNT provider instance.\n */\nexport const lmnt = createLMNT();\n","sourceCodeStart":81,"sourceCodeEnd":113,"githubUrl":"https://github.com/vercel/ai/blob/69428b1f8b037e4d118fb4853428d5c4e620493c/packages/lmnt/src/lmnt-provider.ts#L81-L113","documentation":"LMNT does not offer image generation; its imageModel accessor unconditionally throws NoSuchModelError with this message. The provider deliberately rejects image-model requests to surface the capability mismatch clearly.","triggerScenarios":"Calling lmnt.imageModel('some-model') or passing LMNT where an ImageModel is expected, e.g. in generateImage.","commonSituations":"Wiring LMNT into an image slot in a model registry, or assuming one provider handles all modalities after switching providers in example code.","solutions":["Use an image-capable provider (openai.image, luma.image, etc.) for generateImage","Reserve LMNT for TTS via lmnt.speech(modelId)","Correct any config/registry entries mapping LMNT to image endpoints"],"exampleFix":"// before\nconst { image } = await generateImage({ model: lmnt.imageModel('x'), prompt: 'cat' });\n// after\nconst { image } = await generateImage({ model: luma.image('photon-1'), prompt: 'cat' });","handlingStrategy":"type-guard","validationCode":"// ensure the image provider supports images\nif (providerIsLMNT(imageProvider)) {\n  imageProvider = luma.image('photon-1');\n}","typeGuard":"function supportsImages(p: any): boolean {\n  try { p.imageModel?.('probe'); return true; } catch { return false; }\n}","tryCatchPattern":"try {\n  await generateImage({ model: lmnt.imageModel(id), prompt });\n} catch (e) {\n  if (NoSuchModelError.isInstance(e) && e.modelType === 'imageModel') {\n    // fall back to an image-capable provider\n  } else throw e;\n}","preventionTips":["Use providers like luma/openai for image slots; never LMNT","Centralize provider selection by capability","Probe provider capability at startup in dev/test","Review model registry config after copying examples between providers"],"tags":["provider","no-such-model","image","wrong-provider"],"backgroundTag":"unsupported-model-type","analyzedSha":"69428b1f8b037e4d118fb4853428d5c4e620493c","analyzedAt":"2026-08-30T12:32:21.016Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}