Skip to content

ref(ai-agents): Prefer gen_ai.response.model over gen_ai.request.model#112462

Merged
obostjancic merged 7 commits intomasterfrom
ognjenbostjancic/tet-2206-prefer-gen_airesponsemodel-over-gen_airequestmodel
Apr 9, 2026
Merged

ref(ai-agents): Prefer gen_ai.response.model over gen_ai.request.model#112462
obostjancic merged 7 commits intomasterfrom
ognjenbostjancic/tet-2206-prefer-gen_airesponsemodel-over-gen_airequestmodel

Conversation

@obostjancic
Copy link
Copy Markdown
Member

Swaps agent insight widgets and prebuilt dashboard configs to query gen_ai.response.model instead of gen_ai.request.model, since response model reflects what the provider actually used (e.g. requesting gpt-4 but getting gpt-4-0613).

Affected: modelsTable, tokenUsageWidget, llmCallsWidget, modelCostWidget, aiAgentsModels prebuilt dashboard.

Swaps agent insight widgets and prebuilt dashboard configs to query
gen_ai.response.model instead of gen_ai.request.model, since response
model reflects what the provider actually used.
@linear-code
Copy link
Copy Markdown

linear-code bot commented Apr 8, 2026

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 8, 2026
@obostjancic obostjancic marked this pull request as ready for review April 8, 2026 14:00
@obostjancic obostjancic requested review from a team as code owners April 8, 2026 14:00
Comment on lines +167 to +168
key: 'gen_ai.response.model',
name: 'gen_ai.response.model',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we use the SpanFields.GEN_AI_RESPONSE_MODEL in these other usages as well?

The models dashboard (staticDashboardId 17) queries by
gen_ai.response.model, but the overview's linked dashboard entries and
widget queries still used gen_ai.request.model. This caused the filter
created by getLinkedDashboardUrl to not match the models dashboard widgets.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comment thread static/app/views/insights/pages/agents/components/llmCallsWidget.tsx Outdated
Co-authored-by: Ogi <obostjancic@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit d447d4b. Configure here.

Comment thread static/app/views/insights/pages/agents/components/modelsTable.tsx Outdated
Co-authored-by: Ogi <obostjancic@users.noreply.github.com>
@obostjancic obostjancic merged commit 26dd06e into master Apr 9, 2026
65 checks passed
@obostjancic obostjancic deleted the ognjenbostjancic/tet-2206-prefer-gen_airesponsemodel-over-gen_airequestmodel branch April 9, 2026 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants