Skip to content

ref(ai-monitoring): Always return conversation details envelope - #121143

Merged
vgrozdanic merged 1 commit into
masterfrom
ref/ai-conversation-details-envelope
Aug 4, 2026
Merged

vgrozdanic merged 1 commit into
masterfrom
ref/ai-conversation-details-envelope

Conversation

@vgrozdanic

@vgrozdanic vgrozdanic commented Aug 4, 2026 •

Copy link
Copy Markdown
Member

Before #120746 we had no way of easily extending API response for conversation details, but now we do. apiVersion was just a temporary hack to update all the known clients to the new conversation response. Those clients are now updated, and we can stop returning old response from the API endpoint.

Drop apiVersion gating so GET ai-conversations/<id>/ always returns
{conversationId, title, spans} instead of a bare span list.
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 4, 2026
@vgrozdanic
vgrozdanic marked this pull request as ready for review August 4, 2026 09:47
@vgrozdanic
vgrozdanic requested a review from a team as a code owner August 4, 2026 09:47

@shellmayr shellmayr left a comment

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.

Nice! 🧹

@vgrozdanic
vgrozdanic enabled auto-merge (squash) August 4, 2026 09:48
@vgrozdanic
vgrozdanic merged commit 69a2208 into master Aug 4, 2026
68 checks passed
@vgrozdanic
vgrozdanic deleted the ref/ai-conversation-details-envelope branch August 4, 2026 09:53
vgrozdanic added a commit that referenced this pull request Aug 5, 2026
…121284)

Conversation details fetches no longer pass `apiVersion=2`. The endpoint
always returns the metadata envelope now (#121143), so the version query
param is unused.
jared-outpost Bot added a commit to getsentry/cli that referenced this pull request Aug 5, 2026
…1365)

## Summary

`sentry conversation view` was failing with a Zod validation error after
the conversation details API started always returning an envelope object
instead of a bare span array
([getsentry/sentry#121143](getsentry/sentry#121143)).

## Problem

```
Error: Unexpected response format from /organizations/sentry/ai-conversations/<id>/
Expected array, received object
```

Reproduction:
https://sentry.sentry.io/explore/conversations/project_metadata_summary-317e47d

These endpoints are `PRIVATE` and are not published in `@sentry/api` /
sentry-api-schema, so the CLI owns local Zod schemas for them.

## Changes

- Accept the `{ conversationId, title, spans }` details envelope and
extract `spans` for transcript building
- Surface `title` in human/JSON transcript output when present
- Update API and formatter tests for the new shape (including a
regression that rejects the old bare-array response)

## Testing

- Unit tests: `conversations` API, `conversation view` command,
conversation formatters
- Manual: `pnpm run cli -- conversation view
sentry/project_metadata_summary-317e47d` (no longer errors);
conversation with spans renders title + transcript header


Made with [Cursor](https://cursor.com)

---------

Co-authored-by: Cursor <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: jared-outpost[bot] <jared-outpost[bot]@users.noreply.github.com>
BYK pushed a commit to getsentry/toolkit that referenced this pull request Sep 23, 2026
…1365)

## Summary

`sentry conversation view` was failing with a Zod validation error after
the conversation details API started always returning an envelope object
instead of a bare span array
([getsentry/sentry#121143](getsentry/sentry#121143)).

## Problem

```
Error: Unexpected response format from /organizations/sentry/ai-conversations/<id>/
Expected array, received object
```

Reproduction:
https://sentry.sentry.io/explore/conversations/project_metadata_summary-317e47d

These endpoints are `PRIVATE` and are not published in `@sentry/api` /
sentry-api-schema, so the CLI owns local Zod schemas for them.

## Changes

- Accept the `{ conversationId, title, spans }` details envelope and
extract `spans` for transcript building
- Surface `title` in human/JSON transcript output when present
- Update API and formatter tests for the new shape (including a
regression that rejects the old bare-array response)

## Testing

- Unit tests: `conversations` API, `conversation view` command,
conversation formatters
- Manual: `pnpm run cli -- conversation view
sentry/project_metadata_summary-317e47d` (no longer errors);
conversation with spans renders title + transcript header


Made with [Cursor](https://cursor.com)

---------

Co-authored-by: Cursor <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: jared-outpost[bot] <jared-outpost[bot]@users.noreply.github.com>
BYK pushed a commit to getsentry/toolkit that referenced this pull request Sep 30, 2026
…1365)

## Summary

`sentry conversation view` was failing with a Zod validation error after
the conversation details API started always returning an envelope object
instead of a bare span array
([getsentry/sentry#121143](getsentry/sentry#121143)).

## Problem

```
Error: Unexpected response format from /organizations/sentry/ai-conversations/<id>/
Expected array, received object
```

Reproduction:
https://sentry.sentry.io/explore/conversations/project_metadata_summary-317e47d

These endpoints are `PRIVATE` and are not published in `@sentry/api` /
sentry-api-schema, so the CLI owns local Zod schemas for them.

## Changes

- Accept the `{ conversationId, title, spans }` details envelope and
extract `spans` for transcript building
- Surface `title` in human/JSON transcript output when present
- Update API and formatter tests for the new shape (including a
regression that rejects the old bare-array response)

## Testing

- Unit tests: `conversations` API, `conversation view` command,
conversation formatters
- Manual: `pnpm run cli -- conversation view
sentry/project_metadata_summary-317e47d` (no longer errors);
conversation with spans renders title + transcript header


Made with [Cursor](https://cursor.com)

---------

Co-authored-by: Cursor <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: jared-outpost[bot] <jared-outpost[bot]@users.noreply.github.com>
mr-danya pushed a commit to mr-danya/sentry-mcp that referenced this pull request Oct 6, 2026
…etsentry#1365)

## Summary

`sentry conversation view` was failing with a Zod validation error after
the conversation details API started always returning an envelope object
instead of a bare span array
([getsentry/sentry#121143](getsentry/sentry#121143)).

## Problem

```
Error: Unexpected response format from /organizations/sentry/ai-conversations/<id>/
Expected array, received object
```

Reproduction:
https://sentry.sentry.io/explore/conversations/project_metadata_summary-317e47d

These endpoints are `PRIVATE` and are not published in `@sentry/api` /
sentry-api-schema, so the CLI owns local Zod schemas for them.

## Changes

- Accept the `{ conversationId, title, spans }` details envelope and
extract `spans` for transcript building
- Surface `title` in human/JSON transcript output when present
- Update API and formatter tests for the new shape (including a
regression that rejects the old bare-array response)

## Testing

- Unit tests: `conversations` API, `conversation view` command,
conversation formatters
- Manual: `pnpm run cli -- conversation view
sentry/project_metadata_summary-317e47d` (no longer errors);
conversation with spans renders title + transcript header


Made with [Cursor](https://cursor.com)

---------

Co-authored-by: Cursor <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: jared-outpost[bot] <jared-outpost[bot]@users.noreply.github.com>
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.

2 participants