{"record":{"id":"062196ed87b39852","repo":"mudler/LocalAI","slug":"model-file-path-is-required-in-parameters-model","errorCode":null,"errorMessage":"Model file/path is required in parameters.model","messagePattern":"Model file/path is required in parameters\\.model","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"core/http/views/model-editor.html","lineNumber":1076,"sourceCode":"        \n        validateConfig() {\n            try {\n                const yamlContent = this.yamlEditor.getValue();\n                const config = jsyaml.load(yamlContent);\n                \n                if (!config || typeof config !== 'object') {\n                    throw new Error('Invalid YAML structure');\n                }\n                \n                if (!config.name) {\n                    throw new Error('Model name is required');\n                }\n                const isPipeline = config.pipeline && (config.pipeline.vad || config.pipeline.transcription || config.pipeline.tts || config.pipeline.llm);\n                if (!isPipeline && !config.backend) {\n                    throw new Error('Backend is required');\n                }\n                if (!isPipeline && (!config.parameters || !config.parameters.model)) {\n                    throw new Error('Model file/path is required in parameters.model');\n                }\n                \n                this.showAlert('success', 'Configuration is valid!');\n            } catch (error) {\n                this.showAlert('error', 'Validation failed: ' + error.message);\n            }\n        },\n        \n        async saveConfig() {\n            try {\n                const yamlContent = this.yamlEditor.getValue();\n                const config = jsyaml.load(yamlContent);\n                \n                if (!config || typeof config !== 'object') {\n                    throw new Error('Invalid YAML structure');\n                }\n                \n                if (!config.name) {","sourceCodeStart":1058,"sourceCodeEnd":1094,"githubUrl":"https://github.com/mudler/LocalAI/blob/44413a9d06bf5bc52ce088ba8ca74e5a2e8bee26/core/http/views/model-editor.html#L1058-L1094","documentation":"Thrown by validateConfig() when a non-pipeline config has config.backend set but no config.parameters.model (either the parameters mapping is absent or its model key is). This is the file/path (or repo reference) of the actual model weights the backend loads, so it is mandatory for non-pipeline configs.","triggerScenarios":"A config with name and backend but no 'parameters:' block, or parameters without a 'model:' entry. Pipeline configs (pipeline.vad/transcription/tts/llm) are exempt because components carry their own model references.","commonSituations":"Truncating a template while editing; putting model under a different key (e.g. parameters.model_file) expecting it to be accepted; forgetting that HuggingFace repo ids also go in parameters.model.","solutions":["Add 'parameters:\\n  model: <path-or-repo-id>'","Confirm the value points to an existing GGUF/file path or a valid HF repo id","If editing a pipeline config, make sure the pipeline block is correctly formed so the exemption applies"],"exampleFix":"# before\nname: my-model\nbackend: llama.cpp\n\n# after\nname: my-model\nbackend: llama.cpp\nparameters:\n  model: /models/foo.gguf","handlingStrategy":"validation","validationCode":"function hasParametersModel(config) {\n  return isModelMapping(config)\n    && !!config.parameters\n    && typeof config.parameters === 'object'\n    && !!config.parameters.model\n}","typeGuard":"function hasParametersModel(config) {\n  return isModelMapping(config)\n    && !!config.parameters\n    && typeof config.parameters === 'object'\n    && !!config.parameters.model\n}","tryCatchPattern":"try {\n  if (!isPipelineConfig(config) && !hasParametersModel(config)) throw new Error('Model file/path is required in parameters.model')\n} catch (error) {\n  this.showAlert('error', 'Validation failed: ' + error.message)\n}","preventionTips":["Point parameters.model at a path the LocalAI process can read, or a full HuggingFace repo id","Copy the parameters.model line from a working model config when in doubt","Pipeline configs are exempt — if you hit this unexpectedly, your pipeline block is malformed"],"tags":["yaml","validation","legacy-ui","model-config"],"backgroundTag":null,"analyzedSha":"44413a9d06bf5bc52ce088ba8ca74e5a2e8bee26","analyzedAt":"2026-08-15T10:13:50.291Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}