Budibase/budibase · warning · Error
Invalid agent request title response
Error message
Invalid agent request title response
What it means
generateAgentRequestTitle asks the LLM for a short plain-text UI title and normalizes it (strips quotes/whitespace, collapses spaces). If the normalized result is empty — the model returned nothing, only quotes/whitespace, or an empty text — the function throws Error("Invalid agent request title response").
Source
Thrown at packages/server/src/sdk/workspace/ai/agentRequests/helpers.ts:189
agentId
)
const result = await generateText({
model: llm.chat,
providerOptions: llm.providerOptions?.(false),
headers: {
"x-litellm-tags": "bb-agent-request-title",
},
instructions:
"Write a short UI title for a tracked user request. Base it primarily on the user's actual ask, and use the selected operation only as supporting context. Do not invent internal workflow names, implementation details, or analysis phrasing. Prefer concrete user-facing nouns like the requested item, task, or deliverable. Return plain text only. Use 3 to 8 words, no quotes, no punctuation unless necessary.",
prompt: JSON.stringify({
operation,
latestPrompt,
}),
})
const title = normalizeTitle(result.text || "")
if (!title) {
throw new Error("Invalid agent request title response")
}
return title
}
export async function generateToolCallSummary({
toolName,
readableName,
status,
input,
output,
agentId,
sessionId,
}: {
toolName: string
readableName?: string
status: "success" | "error"
input?: unknownView on GitHub (pinned to a81a902e9a)
Solutions
- Check the agent's aiconfig and LiteLLM logs for empty completions / content filtering
- Catch the error and fall back to a derived title (e.g. truncated first words of latestPrompt)
- Retry the title generation once before failing the request
Example fix
// before
const title = await generateAgentRequestTitle({ latestPrompt, ... })
// after
let title
try {
title = await generateAgentRequestTitle({ latestPrompt, ... })
} catch {
title = normalizePrompt(latestPrompt).split(" ").slice(0, 6).join(" ") || "New request"
} Defensive patterns
Strategy: fallback
Try / catch
let title
try {
title = await generateAgentRequestTitle({ latestPrompt, agentId, sessionId })
} catch (err) {
if (err instanceof Error && err.message === "Invalid agent request title response") {
title = normalizePrompt(latestPrompt).slice(0, 50) || "New request"
} else {
throw err
}
} Prevention
- Verify the agent's aiconfig produces non-empty completions before rollout
- Retry generation once on empty responses
- Keep a deterministic fallback title derived from the prompt
When it happens
Trigger: generateText resolves with an empty or whitespace/quote-only result.text, producing an empty normalized title. Called during initActiveRequest when a new agent request is created.
Common situations: Provider returning empty completions (content filtering, quota exhaustion returning empty body, misconfigured aiconfig); model that replies with only whitespace or refuses the prompt.
Related errors
- Invalid tool call summary response
- No response found
- Invalid agent request link response
- Invalid agent request link response: unknown requestId "${de
- Unable to retrieve object
AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29).
Data as JSON: /api/errors/089a10d371190bec.
Report an issue: GitHub.