{"record":{"id":"7b18151396f53a2f","repo":"conductor-oss/conductor","slug":"llmprovider-not-specified-name","errorCode":null,"errorMessage":"llmProvider not specified: {name}","messagePattern":"llmProvider not specified: (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"ai/src/main/java/org/conductoross/conductor/ai/AIModelProvider.java","lineNumber":65,"sourceCode":"                boolean result = new File(payloadStoreLocation).mkdirs();\n                log.info(\n                        \"Created directory {} ? {} for storing worker payload data\",\n                        payloadStoreLocation,\n                        result);\n                providerToLLM.put(llm.getModelProvider(), llm);\n                for (String alias : llm.getProviderAliases()) {\n                    providerToLLM.put(alias, llm);\n                }\n            } catch (Throwable t) {\n                log.error(\"cannot init {} model, reason: {}\", modelConfiguration, t.getMessage());\n            }\n        }\n    }\n\n    public AIModel getModel(LLMWorkerInput input) {\n        String name = input.getLlmProvider();\n        if (name == null) {\n            throw new RuntimeException(\"llmProvider not specified: \" + name);\n        }\n        AIModel model = providerToLLM.get(name);\n        if (model == null) {\n            throw new RuntimeException(\"no configuration found for: \" + name);\n        }\n        return model;\n    }\n\n    public Consumer<TokenUsageLog> getTokenUsageLogger() {\n        return usageLog -> log.info(\"{}\", usageLog);\n    }\n}\n","sourceCodeStart":47,"sourceCodeEnd":78,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/ai/src/main/java/org/conductoross/conductor/ai/AIModelProvider.java#L47-L78","documentation":"Thrown by AIModelProvider.getModel() when the LLMWorkerInput.llmProvider field is null. The method looks up the configured AIModel by provider name, and a null name means the workflow task input did not specify which LLM provider to use. The message redundantly appends 'null' since the name is always null at this point.","triggerScenarios":"Calling AIModelProvider.getModel(input) where input.getLlmProvider() returns null. This happens when a workflow task (e.g. LLM_TEXT_COMPLETE, LM_GENERATE) is executed without the 'llmProvider' input parameter set in the task definition or task input.","commonSituations":"The workflow JSON omits the llmProvider field in the task's inputParameters. The llmProvider was templated from a variable that resolved to null. The task definition was copied from an example but the provider name was never filled in.","solutions":["Add 'llmProvider' to the task's inputParameters in the workflow definition, e.g. \"llmProvider\": \"openai\"","Verify the input mapping references a non-null variable, e.g. \"llmProvider\": \"${llmProvider_input}\" where the upstream task actually sets it","Check the registered provider names and aliases in your ModelConfiguration beans to pick a valid value"],"exampleFix":"// before (workflow task input missing provider)\n{\"inputParameters\": {\"prompt\": \"Hello\"}}\n// after\n{\"inputParameters\": {\"prompt\": \"Hello\", \"llmProvider\": \"openai\"}}","handlingStrategy":"validation","validationCode":"// Before calling getModel, validate the input\nif (input.getLlmProvider() == null || input.getLlmProvider().isBlank()) {\n    throw new IllegalArgumentException(\"llmProvider must be specified in the task input\");\n}\nAIModel model = aiModelProvider.getModel(input);","typeGuard":"// Guard on LLMWorkerInput\npublic boolean hasValidProvider(LLMWorkerInput input) {\n    return input != null\n        && input.getLlmProvider() != null\n        && !input.getLlmProvider().isBlank();\n}","tryCatchPattern":"try {\n    AIModel model = aiModelProvider.getModel(input);\n} catch (RuntimeException e) {\n    if (e.getMessage().startsWith(\"llmProvider not specified\")) {\n        // surface a user-friendly error, mark task as failed with terminal error\n        taskResult.setStatus(TaskResult.Status.FAILED_WITH_TERMINAL_ERROR);\n        taskResult.setReasonForIncompletion(e.getMessage());\n    } else {\n        throw e;\n    }\n}","preventionTips":["Always set llmProvider in the workflow task definition's inputParameters","Validate llmProvider in a pre-processing task or input schema before the LLM task","Document the available provider names in your project's workflow authoring guide"],"tags":["ai","llm","configuration","input-validation"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}