{"record":{"id":"42a74608cd081351","repo":"janhq/jan","slug":"model-yml-not-found-for-modelid","errorCode":null,"errorMessage":"model.yml not found for ${modelId}","messagePattern":"model\\.yml not found for (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"extensions/llamacpp-extension/src/index.ts","lineNumber":2661,"sourceCode":"  }\n\n  async updateMtpSettings(\n    modelId: string,\n    patch: {\n      mtp?: boolean\n      spec_draft_n_max?: number | null\n      spec_draft_n_min?: number | null\n      spec_draft_p_min?: number | null\n    }\n  ): Promise<void> {\n    const configPath = await joinPath([\n      await this.getProviderPath(),\n      'models',\n      modelId,\n      'model.yml',\n    ])\n    if (!(await fs.existsSync(configPath))) {\n      throw new Error(`model.yml not found for ${modelId}`)\n    }\n    const cfg = (await invoke<ModelConfig>('read_yaml', { path: configPath })) as ModelConfig & {\n      mtp?: boolean\n      spec_draft_n_max?: number\n      spec_draft_n_min?: number\n      spec_draft_p_min?: number\n    }\n\n    if (typeof patch.mtp === 'boolean') cfg.mtp = patch.mtp\n    const assignNumeric = (\n      key: 'spec_draft_n_max' | 'spec_draft_n_min' | 'spec_draft_p_min',\n      value: number | null | undefined\n    ) => {\n      if (value === null) {\n        delete cfg[key]\n      } else if (typeof value === 'number' && Number.isFinite(value)) {\n        cfg[key] = value\n      }","sourceCodeStart":2643,"sourceCodeEnd":2679,"githubUrl":"https://github.com/janhq/jan/blob/7205d770c1e097c3daf35a911176410e93bc5564/extensions/llamacpp-extension/src/index.ts#L2643-L2679","documentation":"Thrown by the model-configuration read path when models/<modelId>/model.yml cannot be found. This YAML file holds the model's config (context length, mtp/speculative-decoding params, etc.), so without it the extension cannot build or validate the model's runtime settings.","triggerScenarios":"Reading model settings/options for a modelId whose model.yml is missing — model not imported through this extension, import interrupted, files manually deleted, or modelId typo/wrong casing.","commonSituations":"Opening model settings in Jan UI for a model from another provider; a failed download left the directory without model.yml; the model was deleted while its settings page was open.","solutions":["Confirm the modelId is correct and belongs to the llamacpp provider.","Re-import or re-download the model so model.yml is regenerated.","Check the provider's models/ directory on disk to see what actually exists.","Refresh the model list / restart the app to clear stale catalog entries."],"exampleFix":"// before\nconst cfg = await getModelConfig(modelId)\n// after\nconst models = await extension.listModels()\nif (!models.some(m => m.id === modelId)) {\n  throw new Error(`Model ${modelId} is not registered with the llamacpp provider`)\n}\nconst cfg = await getModelConfig(modelId)","handlingStrategy":"validation","validationCode":"const settings = await listModelSettings()\nif (!settings.some(s => s.modelId === modelId)) {\n  throw new Error(`No llamacpp settings exist for ${modelId}`)\n}","typeGuard":"null","tryCatchPattern":"try {\n  const cfg = await getModelConfig(modelId)\n} catch (e) {\n  if (String(e).includes('model.yml not found')) {\n    promptUserToReimport(modelId)\n    return defaultModelConfig\n  }\n  throw e\n}","preventionTips":["Import models only through the extension so model.yml is generated.","Verify the modelId belongs to the llamacpp provider, not another provider.","Re-download interrupted imports before reading settings.","Refresh the catalog after any out-of-band file deletion."],"tags":["config","file-not-found","llamacpp","yaml"],"backgroundTag":"config-file-not-found","analyzedSha":"7205d770c1e097c3daf35a911176410e93bc5564","analyzedAt":"2026-09-17T14:27:30.100Z","contentChangedAt":"2026-09-17T14:27:30.100Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}