{"record":{"id":"93421ed4d16360ed","repo":"conductor-oss/conductor","slug":"no-response-generated","errorCode":null,"errorMessage":"No response generated","messagePattern":"No response generated","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"ai/src/main/java/org/conductoross/conductor/ai/LLMHelper.java","lineNumber":370,"sourceCode":"\n    @SneakyThrows\n    private LLMResponse chatComplete(\n            ChatModel chatModel, ChatOptions chatOptions, ChatCompletion input) {\n        ChatClient chatClient = ChatClient.create(chatModel);\n        if (StringUtils.isNotBlank(input.getInstructions())) {\n            input.getMessages()\n                    .addFirst(new ChatMessage(ChatMessage.Role.system, input.getInstructions()));\n        }\n\n        List<Message> messages =\n                new ArrayList<>(input.getMessages().stream().map(this::constructMessage).toList());\n\n        ensureLastMessageIsFromUser(messages);\n\n        Prompt prompt = new Prompt(messages, chatOptions);\n        ChatResponse chatResponse = chatClient.prompt(prompt).call().chatResponse();\n        if (chatResponse == null) {\n            throw new RuntimeException(\"No response generated\");\n        }\n        if (chatResponse.getResults().isEmpty()) {\n            String result = objectMapper.writeValueAsString(chatResponse);\n            return LLMResponse.builder()\n                    .result(result)\n                    .completionTokens(chatResponse.getMetadata().getUsage().getCompletionTokens())\n                    .promptTokens(chatResponse.getMetadata().getUsage().getPromptTokens())\n                    .tokenUsed(chatResponse.getMetadata().getUsage().getTotalTokens())\n                    .build();\n        }\n\n        List<ToolCall> tools = null;\n        String finishReason = null;\n        List<String> responses = new ArrayList<>();\n        List<org.conductoross.conductor.ai.model.Media> media = new ArrayList<>();\n        for (Generation result : chatResponse.getResults()) {\n            if (result.getOutput().hasToolCalls()) {\n                List<AssistantMessage.ToolCall> toolCalls = result.getOutput().getToolCalls();","sourceCodeStart":352,"sourceCodeEnd":388,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/ai/src/main/java/org/conductoross/conductor/ai/LLMHelper.java#L352-L388","documentation":"Thrown by LLMHelper.chatComplete() when Spring AI's ChatClient.prompt(prompt).call().chatResponse() returns null. This means the underlying chat model provider returned no response object at all — not even an empty one.","triggerScenarios":"The ChatClient call to the LLM provider completes without throwing but returns a null ChatResponse. This can happen with certain provider adapters, proxy intermediaries, or when the provider returns an empty HTTP body that the adapter maps to null.","commonSituations":"The LLM provider API key is invalid but the adapter returns null instead of throwing. A proxy or API gateway between Conductor and the provider swallowed the response. The provider endpoint URL is misconfigured pointing to a non-API endpoint. A provider adapter bug returns null on certain error conditions.","solutions":["Verify the provider API key and endpoint configuration are correct","Check network connectivity and any proxy/gateway between Conductor and the LLM provider","Test the same prompt directly against the provider API (e.g. via curl) to confirm it works","Check provider status pages for outages","Enable debug logging for the Spring AI chat client to see the raw HTTP exchange"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Before the call, verify the chat model is properly configured\nChatModel chatModel = llm.getChatModel();\nif (chatModel == null) {\n    throw new IllegalStateException(\"ChatModel is not available for this provider\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    LLMResponse response = llmHelper.chatComplete(task, llm, chatCompletion, location, logger);\n} catch (RuntimeException e) {\n    if (\"No response generated\".equals(e.getMessage())) {\n        log.warn(\"Provider returned null response, will retry\");\n        taskResult.setStatus(TaskResult.Status.IN_PROGRESS);\n        // Conductor will retry based on retry logic\n    } else {\n        throw e;\n    }\n}","preventionTips":["Verify API keys and endpoint URLs are correct in provider configuration","Monitor provider health and set up alerting for null responses","Configure appropriate retry counts in the task definition for transient provider issues","Test provider connectivity in health checks"],"tags":["ai","llm","provider","null-response"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}