Skip to content

Commit 36bdfbc

Browse files
authored
feat(agent-insights): Prioritize response model (#97659)
Prioritize displaying response model vs request model in span details. Hide ai input section if the messages array is empty. - closes [TET-1008: Update Spans summary to show response model first](https://linear.app/getsentry/issue/TET-1008/update-spans-summary-to-show-response-model-first)
1 parent c1a561b commit 36bdfbc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

static/app/views/performance/newTraceDetails/traceDrawer/details/highlightedAttributes.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function getAISpanAttributes(
6666
) {
6767
const highlightedAttributes = [];
6868

69-
const model = attributes['gen_ai.request.model'] || attributes['gen_ai.response.model'];
69+
const model = attributes['gen_ai.response.model'] || attributes['gen_ai.request.model'];
7070
if (model) {
7171
highlightedAttributes.push({
7272
name: t('Model'),

static/app/views/performance/newTraceDetails/traceDrawer/details/span/eapSections/aiInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ export function AIInputSection({
192192

193193
const toolArgs = getTraceNodeAttribute('gen_ai.tool.input', node, event, attributes);
194194

195-
if (!messages && !toolArgs) {
195+
if ((!messages || messages.length === 0) && !toolArgs) {
196196
return null;
197197
}
198198

0 commit comments

Comments
 (0)