mudler/LocalAI · warning · Error

Model file/path is required in parameters.model

Error message

Model file/path is required in parameters.model

What it means

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.

Source

Thrown at core/http/views/model-editor.html:1076

        
        validateConfig() {
            try {
                const yamlContent = this.yamlEditor.getValue();
                const config = jsyaml.load(yamlContent);
                
                if (!config || typeof config !== 'object') {
                    throw new Error('Invalid YAML structure');
                }
                
                if (!config.name) {
                    throw new Error('Model name is required');
                }
                const isPipeline = config.pipeline && (config.pipeline.vad || config.pipeline.transcription || config.pipeline.tts || config.pipeline.llm);
                if (!isPipeline && !config.backend) {
                    throw new Error('Backend is required');
                }
                if (!isPipeline && (!config.parameters || !config.parameters.model)) {
                    throw new Error('Model file/path is required in parameters.model');
                }
                
                this.showAlert('success', 'Configuration is valid!');
            } catch (error) {
                this.showAlert('error', 'Validation failed: ' + error.message);
            }
        },
        
        async saveConfig() {
            try {
                const yamlContent = this.yamlEditor.getValue();
                const config = jsyaml.load(yamlContent);
                
                if (!config || typeof config !== 'object') {
                    throw new Error('Invalid YAML structure');
                }
                
                if (!config.name) {

View on GitHub (pinned to 44413a9d06)

Solutions

  1. Add 'parameters:\n model: <path-or-repo-id>'
  2. Confirm the value points to an existing GGUF/file path or a valid HF repo id
  3. If editing a pipeline config, make sure the pipeline block is correctly formed so the exemption applies

Example fix

# before
name: my-model
backend: llama.cpp

# after
name: my-model
backend: llama.cpp
parameters:
  model: /models/foo.gguf
Defensive patterns

Strategy: validation

Validate before calling

function hasParametersModel(config) {
  return isModelMapping(config)
    && !!config.parameters
    && typeof config.parameters === 'object'
    && !!config.parameters.model
}

Type guard

function hasParametersModel(config) {
  return isModelMapping(config)
    && !!config.parameters
    && typeof config.parameters === 'object'
    && !!config.parameters.model
}

Try / catch

try {
  if (!isPipelineConfig(config) && !hasParametersModel(config)) throw new Error('Model file/path is required in parameters.model')
} catch (error) {
  this.showAlert('error', 'Validation failed: ' + error.message)
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of mudler/LocalAI@44413a9d06 (2026-08-15). Data as JSON: /api/errors/062196ed87b39852. Report an issue: GitHub.