Skip to content

fix: filter thread metadata before sending it to the client - #3053

Open
ayylemao wants to merge 2 commits into
Chainlit:mainfrom
ayylemao:main
Open

ayylemao wants to merge 2 commits into
Chainlit:mainfrom
ayylemao:main

Conversation

@ayylemao

@ayylemao ayylemao commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Closes #3052

Problem

Thread retrieval, listings, and resume events sent all stored thread metadata to the client, including backend-specific values the frontend does not use. Shared threads removed a few known fields but still exposed arbitrary custom metadata.

Changes

Filter metadata at these response boundaries to include only fields used by the frontend:

  • is_shared and viewer_read_only
  • chat_profile and chat_settings when retrieving or resuming an owner's thread

The stored metadata remains unchanged and fully available to the backend. Custom metadata fields are no longer included in client responses.


Summary by cubic

Filters thread metadata sent to the client so backend-specific and custom fields are no longer exposed, closing #3052.

Previously, thread retrieval, listings, and resume events sent the full stored metadata to the browser. Now only the frontend fields is_shared and viewer_read_only (plus chat_profile and chat_settings for an owner's thread) are included in responses. Stored metadata remains unchanged and fully available to the backend.

Written for commit bcbd925. Summary will update on new commits.

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 3 files

Re-trigger cubic

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Thread endpoints may expose backend-specific metadata

1 participant