{"record":{"id":"b9aab4f8592b8254","repo":"Mintplex-Labs/anything-llm","slug":"llm-processing-failed-error-message","errorCode":null,"errorMessage":"LLM processing failed: ${error.message}","messagePattern":"LLM processing failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"server/utils/agentFlows/executors/llm-instruction.js","lineNumber":43,"sourceCode":"\n    let completion;\n    const provider = aibitat.getProviderForConfig(aibitat.defaultProvider);\n    if (provider.supportsAgentStreaming) {\n      completion = await provider.stream(\n        [{ role: \"user\", content: input }],\n        [],\n        null\n      );\n    } else {\n      completion = await provider.complete([{ role: \"user\", content: input }]);\n    }\n\n    introspect(`Successfully received LLM response`);\n    if (resultVariable) config.resultVariable = resultVariable;\n    return completion.textResponse;\n  } catch (error) {\n    logger(`LLM processing failed: ${error.message}`, error);\n    throw new Error(`LLM processing failed: ${error.message}`);\n  }\n}\n\nmodule.exports = executeLLMInstruction;\n","sourceCodeStart":25,"sourceCodeEnd":48,"githubUrl":"https://github.com/Mintplex-Labs/anything-llm/blob/526360e320da9d1b36074be5ed64fe76e5bbfbbd/server/utils/agentFlows/executors/llm-instruction.js#L25-L48","documentation":"The catch-all in executeLLMInstruction(). Any failure during provider.stream() or provider.complete(), or when accessing completion.textResponse, is logged and re-thrown with this prefix. The executor depends on aibitat.defaultProvider being configured and the provider being reachable.","triggerScenarios":"aibitat.defaultProvider is null/undefined (TypeError reading .provider or .model); the provider API key is missing or invalid; the model name is wrong or unavailable; the provider request times out or is rate-limited; completion is returned without a textResponse property.","commonSituations":"Running an LLM Instruction block in a flow without a default LLM provider configured for the agent; expired API key; pointing at a local model server (Ollama/LMStudio) that is not running; a model identifier that does not exist on the provider.","solutions":["Confirm a default LLM provider and model are configured for the agent running the flow (aibitat.defaultProvider must be set).","Verify the provider API key is valid and has quota/billing.","Check that the model name is correct and available on the chosen provider.","If using a local provider, ensure the local server is running and reachable.","Inspect server logs for the original error logged before the re-throw."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"function validateLlmStepContext(context) {\n  const p = context?.aibitat?.defaultProvider;\n  if (!p || !p.provider || !p.model)\n    throw new Error(\"LLM Instruction block requires aibitat.defaultProvider with provider and model\");\n}","typeGuard":"const hasDefaultProvider = (aibitat) =>\n  !!(aibitat && aibitat.defaultProvider && aibitat.defaultProvider.provider && aibitat.defaultProvider.model);","tryCatchPattern":"try {\n  result = await executeLLMInstruction(config, context);\n} catch (error) {\n  if (error.message.startsWith(\"LLM processing failed\")) {\n    // surface to the flow as a failed step; result captured by FlowExecutor\n  } else throw error;\n}","preventionTips":["Ensure the agent running the flow has a default LLM provider and model configured.","Keep provider API keys valid and within quota.","For local providers, confirm the server is up before executing the flow."],"tags":["llm","provider","agent-flows","error-handling"],"backgroundTag":null,"analyzedSha":"526360e320da9d1b36074be5ed64fe76e5bbfbbd","analyzedAt":"2026-08-13T01:45:47.170Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}