{"record":{"id":"4a1fdf3ea55a1fcf","repo":"conductor-oss/conductor","slug":"no-configuration-found-for-name","errorCode":null,"errorMessage":"no configuration found for: {name}","messagePattern":"no configuration found for: (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"ai/src/main/java/org/conductoross/conductor/ai/AIModelProvider.java","lineNumber":69,"sourceCode":"                        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":51,"sourceCodeEnd":78,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/ai/src/main/java/org/conductoross/conductor/ai/AIModelProvider.java#L51-L78","documentation":"Thrown by AIModelProvider.getModel() when llmProvider is non-null but does not match any registered provider name or alias in the providerToLLM map. This map is populated during AIModelProvider construction from all ModelConfiguration beans; if a model fails to init (logged as 'cannot init'), it silently never registers.","triggerScenarios":"Calling getModel(input) with a provider name that has no corresponding ModelConfiguration bean, or whose bean threw during initialization. Also triggered when the name has a typo or uses a case that doesn't match the registered provider or its aliases.","commonSituations":"The requested provider (e.g. 'anthropic') has no ModelConfiguration bean in the Spring context. The model bean exists but failed to initialize — API key missing, misconfigured base URL — and was swallowed by the catch block at line 56. The provider name has a casing mismatch or is not among the configured aliases.","solutions":["Check server logs for 'cannot init ... model, reason:' messages — a failed init silently skips registration","Verify a ModelConfiguration bean for the requested provider is present and its getProviderAliases() includes the name you are passing","Ensure required API keys and configuration properties (e.g. OPENAI_API_KEY) are set in the environment","Correct typos or casing in the llmProvider value to match a registered provider name or alias"],"exampleFix":"// before\n{\"llmProvider\": \"antropic\"}\n// after\n{\"llmProvider\": \"anthropic\"}","handlingStrategy":"validation","validationCode":"// Check if provider is registered before calling getModel\nString providerName = input.getLlmProvider();\nif (providerName != null && !providerName.isBlank()) {\n    // Check startup logs for 'cannot init ... model' messages\n    // These indicate a model bean failed to register\n}","typeGuard":"// Check available providers at startup\n@Autowired AIModelProvider provider;\n// After construction, inspect the providerToLLM map keys\n// to confirm all expected providers registered successfully","tryCatchPattern":"try {\n    AIModel model = aiModelProvider.getModel(input);\n} catch (RuntimeException e) {\n    if (e.getMessage().startsWith(\"no configuration found for:\")) {\n        taskResult.setStatus(TaskResult.Status.FAILED_WITH_TERMINAL_ERROR);\n        taskResult.setReasonForIncompletion(\n            \"LLM provider '\" + input.getLlmProvider() + \"' is not configured. \" +\n            \"Check server logs for model initialization failures.\");\n    } else {\n        throw e;\n    }\n}","preventionTips":["Monitor startup logs for 'cannot init ... model' messages — these silently skip registration","Implement a health check that verifies all expected providers are registered after startup","Use consistent provider naming across workflow definitions and configuration","Test model bean initialization in isolation during CI to catch config issues early"],"tags":["ai","llm","configuration","bean-registration"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}