OpenAPI 3.0.0raw.githubusercontent.com2026-08-1291215647.5 KB

11f5086fcbb8

Conversations

Regenerate AI response

Regenerate the AI response for a specific message and stream the new answer over Server-Sent Events.

Overview:

If you're not satisfied with an AI response, use this endpoint to generate a new answer. The original user query is re-processed and a new bot response replaces the previous one in place.

Constraints:

  • Only the last message of the conversation can be regenerated.
  • The target message must be of type bot_response.

Use Cases:

  • Response was incomplete or unclear
  • Want to try a different AI model
  • New documents have been indexed since original response

Model Override:

Specify modelKey to use a different model for regeneration.

Streaming:

The response is delivered as an AG-UI text/event-stream stream. Routing still depends on chatMode: internal_search and web_search use the assistant backend, while agent uses the universal agent loop. See SSEEvent for the event vocabulary.

post/conversations/{conversationId}/message/{messageId}/regenerate

Path parameters

conversationIdstring objectId required
messageIdstring objectId required

ID of the message to regenerate response for

Request body

modelKeystring

Identifier of the AI model configuration to use for regeneration. Typically a UUID returned by the model-management endpoints. When omitted, the model used for the original message is reused.

modelNamestring

Provider model name (e.g. the underlying LLM identifier).

modelFriendlyNamestring

Friendly display name of the selected model.

chatModestring

Chat mode used for regeneration (for example internal_search, web_search, or the universal agent mode).

timezonestring

IANA timezone identifier from the client. Used to provide time-aware context to the AI during regeneration.

currentTimestring date-time

ISO 8601 / RFC 3339 datetime from the client (UTC Z or numeric offset). Used to anchor any relative time references in the query.

toolsstring[]

Optional list of tool identifiers (fully-qualified action names such as jira.create_issue) the agent may invoke when regenerating. Applicable only in agent chat modes.

protocol'agui'

AG-UI is the only supported wire protocol. When present must be "agui". Omitting the field is equivalent — the server always uses the AG-UI vocabulary. Kept in the schema for backward compatibility with callers that already send it.

Example request

{
  "modelKey": "05438a37-68f2-4641-a8dc-6c47e63278ca",
  "modelName": "gpt-5.4-mini",
  "modelFriendlyName": "mini",
  "chatMode": "internal_search",
  "timezone": "Asia/Calcutta",
  "currentTime": "2026-05-11T15:43:21+05:30",
  "tools": [
    "jira.create_issue",
    "confluence.search_content"
  ]
}

Response

SSE stream established. The body is a sequence of text/event-stream frames using the event vocabulary described on SSEEvent. The exact subset of events emitted depends on chatMode (see the route description for routing rules).

The gateway emits a root RUN_FINISHED as { type, result } after persistence and a root RUN_ERROR as { type, message, code? } on failure. Forwarded lifecycle and child-run events may contain runId, threadId, and parentRunId. Clients should ignore unknown event names.