{"record":{"id":"1012832aefbedc1d","repo":"Mintplex-Labs/anything-llm","slug":"docker-model-runner-chat-this-model-is-not-val","errorCode":null,"errorMessage":"Docker Model Runner chat: ${this.model} is not valid or defined model for chat completion!","messagePattern":"Docker Model Runner chat: (.+?) is not valid or defined model for chat completion!","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"server/utils/AiProviders/dockerModelRunner/index.js","lineNumber":150,"sourceCode":"    attachments = [],\n  }) {\n    const prompt = {\n      role: \"system\",\n      content: `${systemPrompt}${this.#appendContext(contextTexts)}`,\n    };\n    return [\n      prompt,\n      ...formatChatHistory(chatHistory, this.#generateContent),\n      {\n        role: \"user\",\n        content: this.#generateContent({ userPrompt, attachments }),\n      },\n    ];\n  }\n\n  async getChatCompletion(messages = null, { temperature = 0.7 }) {\n    if (!this.model)\n      throw new Error(\n        `Docker Model Runner chat: ${this.model} is not valid or defined model for chat completion!`\n      );\n\n    const result = await LLMPerformanceMonitor.measureAsyncFunction(\n      this.dmr.chat.completions.create({\n        model: this.model,\n        messages,\n        temperature,\n      })\n    );\n\n    if (\n      !result.output.hasOwnProperty(\"choices\") ||\n      result.output.choices.length === 0\n    )\n      return null;\n\n    return {","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/Mintplex-Labs/anything-llm/blob/3aec848f2885144aa8f1e53b9731a04310d5d558/server/utils/AiProviders/dockerModelRunner/index.js#L132-L168","documentation":"Sentinel guard at the top of DockerModelRunnerLLM.getChatCompletion: thrown when this.model is falsy, meaning the configured Docker Model Runner model preference never resolved to a usable model identifier before a non-streaming chat completion was attempted.","triggerScenarios":"Thrown when the configured model is not available for chat completion.","commonSituations":"Model not pulled or misspelled model name.","solutions":["Set a valid model available in Docker Model Runner.","Pull the model in Docker Model Runner first."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3aec848f2885144aa8f1e53b9731a04310d5d558","analyzedAt":"2026-08-18T10:02:21.017Z","contentChangedAt":"2026-08-18T10:02:21.017Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}