Budibase/budibase · error · Error

Invalid interaction summary response

Error message

Invalid interaction summary response

What it means

generateInteractionSummary asks the LLM to produce a short third-person title (4-6 words) of the user's message for the agent-request timeline UI. The LLM's text is passed through normalizeTitle (strips quotes/punctuation/whitespace); if the sanitized result is empty, the response is treated as unusable and this error is thrown. It guards the timeline against blank titles produced by empty prompt input, refusal replies, or model misbehavior.

Source

Thrown at packages/server/src/sdk/workspace/ai/agentRequests/helpers.ts:271

  const llm = await sdk.ai.llm.createLLM(
    agent.aiconfig,
    sessionId,
    undefined,
    agentId
  )
  const result = await generateText({
    model: llm.chat,
    providerOptions: llm.providerOptions?.(false),
    headers: {
      "x-litellm-tags": "bb-agent-request-interaction-summary",
    },
    instructions: `Summarize the user's intent in this single message for a UI timeline entry. Write it in third person starting with "User", e.g. "User asked about VPN access". Return plain text only. Use 4 to 6 words, no quotes, no punctuation unless necessary.`,
    prompt: latestPrompt,
  })

  const summary = normalizeTitle(result.text || "")
  if (!summary) {
    throw new Error("Invalid interaction summary response")
  }

  return summary
}

export interface RequestOutcomeDecision {
  status: "completed" | "failed"
  reason: string
}

const summarizeActionForOutcome = (action: AgentRequestAction) => {
  switch (action.type) {
    case "user_message":
      return { type: action.type, summary: action.summary }
    case "tool_call":
      return {
        type: action.type,
        tool: action.readableName || action.toolName,

View on GitHub (pinned to a81a902e9a)

Solutions

  1. Validate latestPrompt is non-empty (after trim) before calling generateInteractionSummary
  2. Check the agent's aiconfig and the LiteLLM route are healthy (a real completion should come back for a normal prompt)
  3. Retry the summary generation once; LLM empty replies are often transient
  4. Inspect the raw result.text in logs to see whether the model refused or returned an unparseable format, and adjust the instructions/model

Example fix

// before
generateInteractionSummary({ latestPrompt, agentId, sessionId })
// after
if (!latestPrompt.trim()) {
  latestPrompt = "(empty message)"
}
await generateInteractionSummary({ latestPrompt, agentId, sessionId })
Defensive patterns

Strategy: fallback

Validate before calling

if (!latestPrompt || !latestPrompt.trim()) {
  throw new Error("Cannot summarize an empty prompt")
}

Try / catch

let title
try {
  title = await generateInteractionSummary({ latestPrompt, agentId, sessionId })
} catch {
  title = "User sent a message" // safe fallback for the timeline entry
}

Prevention

When it happens

Trigger: Calling generateInteractionSummary({latestPrompt, agentId, sessionId}) when: (1) latestPrompt is empty/whitespace-only so the model has nothing to summarize, (2) the LLM returns an empty or refusal-only text (e.g. quota exhausted, filtered content), (3) normalizeTitle strips everything from the reply (e.g. reply was only quotes/punctuation or a JSON wrapper the normalizer discards).

Common situations: AI provider misconfiguration (agent.aiconfig pointing at a broken LiteLLM route) causing empty completions; a user sending an emoji-only or whitespace message; model asked to summarize a prompt containing only quotes; provider returning a refusal string that normalizes to nothing.

Related errors


AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29). Data as JSON: /api/errors/93d01b01209b0c07. Report an issue: GitHub.