Skip to content

feat(ai-monitoring): Return conversation title behind apiVersion=2 - #120746

Draft
vgrozdanic wants to merge 1 commit into
masterfrom
feat/conversation-details-title
Draft

feat(ai-monitoring): Return conversation title behind apiVersion=2#120746
vgrozdanic wants to merge 1 commit into
masterfrom
feat/conversation-details-title

Conversation

@vgrozdanic

@vgrozdanic vgrozdanic commented Jul 28, 2026

Copy link
Copy Markdown
Member

Follow up to #120665, which added title to the conversations list and left the details endpoint alone because adding one there breaks its response shape.

That endpoint returns a bare array of spans, so there is nowhere to put a field that describes the conversation rather than a span. Passing apiVersion=2 now returns an object instead, with the spans moved under data:

// no apiVersion, or apiVersion=1 — unchanged
[ {span}, {span} ]

// apiVersion=2
{
  "conversationId": "abc",
  "title": "Refund a duplicate charge",  // null when nothing has been titled yet
  "data": [ {span}, {span} ]
}

Requests that don't send the parameter keep the old array, so this lands without touching the UI. The frontend switches over in its own PR, and only once it pins apiVersion=2 explicitly does flipping the default become safe for cached bundles. An unsupported value is a 400 rather than a silent fallback. Pagination is unaffected either way — cursors live in the Link header, not the body.

The details endpoint returns a bare list of spans, which leaves no room for conversation-level fields. Passing apiVersion=2 now returns an object with conversationId, title, and the spans under data. Requests without the parameter keep the existing list response, so the shape can be broken in a follow up once clients have moved over.

Titles are keyed on (project_id, conversation_id_hash), so they are resolved against the projects of the returned spans. When a conversation id is titled in more than one project, the earliest title_source_timestamp wins, matching the earliest-span rule the title generation task already applies.
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant