{"record":{"id":"3b898e7e6d8bb007","repo":"immich-app/immich","slug":"unknown-clip-model-newconfig-machinelearning-cl","errorCode":null,"errorMessage":"Unknown CLIP model: ${newConfig.machineLearning.clip.modelName}. Please check the model name for typos and confirm this is a supported model.","messagePattern":"Unknown CLIP model: (.+?)\\. Please check the model name for typos and confirm this is a supported model\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"server/src/services/smart-info.service.ts","lineNumber":28,"sourceCode":"\n@Injectable()\nexport class SmartInfoService extends BaseService {\n  @OnEvent({ name: 'ConfigInit', workers: [ImmichWorker.Microservices] })\n  async onConfigInit({ newConfig }: ArgOf<'ConfigInit'>) {\n    await this.init(newConfig);\n  }\n\n  @OnEvent({ name: 'ConfigUpdate', workers: [ImmichWorker.Microservices], server: true })\n  async onConfigUpdate({ oldConfig, newConfig }: ArgOf<'ConfigUpdate'>) {\n    await this.init(newConfig, oldConfig);\n  }\n\n  @OnEvent({ name: 'ConfigValidate' })\n  onConfigValidate({ newConfig }: ArgOf<'ConfigValidate'>) {\n    try {\n      getCLIPModelInfo(newConfig.machineLearning.clip.modelName);\n    } catch {\n      throw new Error(\n        `Unknown CLIP model: ${newConfig.machineLearning.clip.modelName}. Please check the model name for typos and confirm this is a supported model.`,\n      );\n    }\n  }\n\n  private async init(newConfig: SystemConfig, oldConfig?: SystemConfig) {\n    if (!isSmartSearchEnabled(newConfig.machineLearning)) {\n      return;\n    }\n\n    await this.databaseRepository.withLock(DatabaseLock.CLIPDimSize, async () => {\n      const { dimSize } = getCLIPModelInfo(newConfig.machineLearning.clip.modelName);\n      const dbDimSize = await this.databaseRepository.getDimensionSize('smart_search');\n      this.logger.verbose(`Current database CLIP dimension size is ${dbDimSize}`);\n\n      const modelChange =\n        oldConfig && oldConfig.machineLearning.clip.modelName !== newConfig.machineLearning.clip.modelName;\n      const isDimSizeChange = dbDimSize !== dimSize;","sourceCodeStart":10,"sourceCodeEnd":46,"githubUrl":"https://github.com/immich-app/immich/blob/e55ac299a4ec7cb372e35dbf2c6c05ee9ce77f6c/server/src/services/smart-info.service.ts#L10-L46","documentation":"During system-config validation, Immich's SmartInfoService calls getCLIPModelInfo to resolve the configured CLIP model name; if the name is not in the known model catalog, validation fails with this error, preventing an unusable ML configuration from being saved.","triggerScenarios":"Saving a system config whose machineLearning.clip.modelName is misspelled, an unsupported/incompatible model name, or a name removed from Immich's supported list.","commonSituations":"Copy-pasting a HuggingFace model name that Immich's ML server doesn't support; typos like 'ViT-L-14' vs the exact supported string; upgrading Immich after a model was renamed/dropped.","solutions":["Use one of the supported CLIP model names from Immich's ML settings (e.g. 'immich-app/ViT-B-32__openai' or 'immich-app/ViT-B-16__laion2b_s34b_b88k').","Check for typos and exact casing of the model name in Administration > Settings > Machine Learning > Smart Search.","After fixing, re-run the smart search job to rebuild embeddings with the valid model.","Pin a known-good model name if upgrading Immich changed the supported list."],"exampleFix":"// before\n\"clip\": { \"modelName\": \"ViT-B-32\" }\n// after\n\"clip\": { \"modelName\": \"immich-app/ViT-B-32__openai\" }","handlingStrategy":"try-catch","validationCode":"import { getCLIPModelInfo } from 'src/utils/misc';\ntry { getCLIPModelInfo(modelName); } catch { throw new Error(`${modelName} is not a supported CLIP model`); }","typeGuard":null,"tryCatchPattern":"try {\n  await api.updateConfig(config);\n} catch (e) {\n  if (/Unknown CLIP model/.test(e.message)) {\n    config.machineLearning.clip.modelName = DEFAULT_CLIP_MODEL;\n    await api.updateConfig(config);\n  } else throw e;\n}","preventionTips":["Only use model names listed in Immich's ML settings UI","Copy model names exactly, including the 'immich-app/' org prefix","Re-check model names after Immich upgrades","Test config changes in a staging instance first"],"tags":["immich","machine-learning","clip","config-validation"],"backgroundTag":"invalid-config-value","analyzedSha":"e55ac299a4ec7cb372e35dbf2c6c05ee9ce77f6c","analyzedAt":"2026-09-15T07:20:19.675Z","contentChangedAt":"2026-09-15T07:20:19.675Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}