conductor-oss/conductor · error · RuntimeException

No response generated

Error message

No response generated

What it means

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.

Source

Thrown at ai/src/main/java/org/conductoross/conductor/ai/LLMHelper.java:370

    @SneakyThrows
    private LLMResponse chatComplete(
            ChatModel chatModel, ChatOptions chatOptions, ChatCompletion input) {
        ChatClient chatClient = ChatClient.create(chatModel);
        if (StringUtils.isNotBlank(input.getInstructions())) {
            input.getMessages()
                    .addFirst(new ChatMessage(ChatMessage.Role.system, input.getInstructions()));
        }

        List<Message> messages =
                new ArrayList<>(input.getMessages().stream().map(this::constructMessage).toList());

        ensureLastMessageIsFromUser(messages);

        Prompt prompt = new Prompt(messages, chatOptions);
        ChatResponse chatResponse = chatClient.prompt(prompt).call().chatResponse();
        if (chatResponse == null) {
            throw new RuntimeException("No response generated");
        }
        if (chatResponse.getResults().isEmpty()) {
            String result = objectMapper.writeValueAsString(chatResponse);
            return LLMResponse.builder()
                    .result(result)
                    .completionTokens(chatResponse.getMetadata().getUsage().getCompletionTokens())
                    .promptTokens(chatResponse.getMetadata().getUsage().getPromptTokens())
                    .tokenUsed(chatResponse.getMetadata().getUsage().getTotalTokens())
                    .build();
        }

        List<ToolCall> tools = null;
        String finishReason = null;
        List<String> responses = new ArrayList<>();
        List<org.conductoross.conductor.ai.model.Media> media = new ArrayList<>();
        for (Generation result : chatResponse.getResults()) {
            if (result.getOutput().hasToolCalls()) {
                List<AssistantMessage.ToolCall> toolCalls = result.getOutput().getToolCalls();

View on GitHub (pinned to cf7c3e4a8a)

Solutions

  1. Verify the provider API key and endpoint configuration are correct
  2. Check network connectivity and any proxy/gateway between Conductor and the LLM provider
  3. Test the same prompt directly against the provider API (e.g. via curl) to confirm it works
  4. Check provider status pages for outages
  5. Enable debug logging for the Spring AI chat client to see the raw HTTP exchange
Defensive patterns

Strategy: retry

Validate before calling

// Before the call, verify the chat model is properly configured
ChatModel chatModel = llm.getChatModel();
if (chatModel == null) {
    throw new IllegalStateException("ChatModel is not available for this provider");
}

Try / catch

try {
    LLMResponse response = llmHelper.chatComplete(task, llm, chatCompletion, location, logger);
} catch (RuntimeException e) {
    if ("No response generated".equals(e.getMessage())) {
        log.warn("Provider returned null response, will retry");
        taskResult.setStatus(TaskResult.Status.IN_PROGRESS);
        // Conductor will retry based on retry logic
    } else {
        throw e;
    }
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of conductor-oss/conductor@cf7c3e4a8a (2026-08-14). Data as JSON: /api/errors/93421ed4d16360ed. Report an issue: GitHub.