{"record":{"id":"cf2ace31b4f07e9e","repo":"quarkusio/quarkus","slug":"assistant-not-available","errorCode":null,"errorMessage":"Assistant not available","messagePattern":"Assistant not available","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/devmode-spi/src/main/java/io/quarkus/dev/console/DevConsoleManager.java","lineNumber":167,"sourceCode":"    /**\n     * Invokes a registered action\n     *\n     * @param name the name of the action\n     * @param params the named parameters\n     * @return the result of the invocation. An empty map is returned for action not returning any result.\n     */\n    @SuppressWarnings(\"unchecked\")\n    public static <T> T invoke(String name, Map<String, String> params) {\n        var function = actions.get(name);\n        if (function == null) {\n            // Try assistant actions\n            var bifunction = assistantActions.get(name);\n            if (bifunction != null) {\n                Object assistant = DevConsoleManager.getGlobal(DEV_MANAGER_GLOBALS_ASSISTANT);\n                if (assistant != null) {\n                    return (T) bifunction.apply(assistant, params);\n                } else {\n                    throw new RuntimeException(\"Assistant not available\");\n                }\n            } else {\n                throw new NoSuchElementException(name);\n            }\n        } else {\n            return (T) function.apply(params);\n        }\n    }\n}\n","sourceCodeStart":149,"sourceCodeEnd":177,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/core/devmode-spi/src/main/java/io/quarkus/dev/console/DevConsoleManager.java#L149-L177","documentation":"DevConsoleManager.invokeAssistant looks up a named assistant action and applies it to a globally registered assistant object. This error means an assistant action handler for the given name is registered, but no actual assistant implementation was ever set via the DEV_MANAGER_GLOBALS_ASSISTANT global, so the action cannot be dispatched.","triggerScenarios":"Calling DevConsoleManager.invokeAssistant(name, params) when assistantActions contains the name (registered at build/deployment time) but DevConsoleManager.setGlobal(DEV_MANAGER_GLOBALS_ASSISTANT, ...) was never called, e.g. no AI assistant extension is active in the running dev-mode application.","commonSituations":"Clicking an AI-assist feature in the Dev UI in a project that has no assistant extension (e.g. quarkus-langchain4j assistant not configured); invoking a dev-mode assistant endpoint programmatically without the assistant runtime installed.","solutions":["Add/configure the assistant provider extension so the assistant global is registered at startup","Remove or guard calls to invokeAssistant when no assistant is present (check DevConsoleManager.getGlobal(DEV_MANAGER_GLOBALS_ASSISTANT) first)","Set the DEV_MANAGER_GLOBALS_ASSISTANT global before invoking assistant actions","Upgrade the assistant extension — older versions may fail to register the global"],"exampleFix":"// before\nObject result = DevConsoleManager.invokeAssistant(\"explainError\", params);\n// after\nif (DevConsoleManager.getGlobal(DevConsoleManager.DEV_MANAGER_GLOBALS_ASSISTANT) == null) {\n    throw new ServiceUnavailableException(\"No assistant configured\");\n}\nObject result = DevConsoleManager.invokeAssistant(\"explainError\", params);","handlingStrategy":"validation","validationCode":"if (DevConsoleManager.getGlobal(DevConsoleManager.DEV_MANAGER_GLOBALS_ASSISTANT) == null) {\n    throw new ServiceUnavailableException(\"Assistant not configured in this app\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    return DevConsoleManager.invokeAssistant(name, params);\n} catch (RuntimeException e) {\n    if (\"Assistant not available\".equals(e.getMessage())) {\n        return fallbackResponse(name);\n    }\n    throw e;\n}","preventionTips":["Check the assistant global before dispatching assistant actions","Only register assistant Dev UI actions when the assistant extension is present","Gate assistant UI features behind a capability check"],"tags":["devmode","dev-console","assistant","missing-dependency"],"backgroundTag":"assistant-not-available","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}