fix: include conversation_starters in agent list projection#12304
Open
inodb wants to merge 1 commit intodanny-avila:mainfrom
Open
fix: include conversation_starters in agent list projection#12304inodb wants to merge 1 commit intodanny-avila:mainfrom
inodb wants to merge 1 commit intodanny-avila:mainfrom
Conversation
The getListAgentsByAccess query uses an explicit field projection that was missing conversation_starters, so the field was never returned to the client even when set in the database. This meant agent conversation starters could never render in the UI. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes the agents list API response to include conversation_starters, enabling the client’s ConversationStarters UI to render starters for agents when configured in MongoDB.
Changes:
- Add
conversation_starters: 1to thegetListAgentsByAccessMongo projection soGET /api/agentsreturns the field.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines 717 to 721
| category: 1, | ||
| support_contact: 1, | ||
| is_promoted: 1, | ||
| conversation_starters: 1, | ||
| }).sort({ updatedAt: -1, _id: 1 }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
getListAgentsByAccessquery inapi/models/Agent.jsuses an explicit field projection that was missingconversation_startersConversationStarterscomponent — even when correctly set in the databaseconversation_starters: 1to the projectionContext
The original conversation starters feature (PR #3699) was built for assistants, which use a separate
documentsendpoint. When agents were added later, the agent list projection was written with a hardcoded field list that never includedconversation_starters.Test plan
conversation_starterson an agent in MongoDBGET /api/agents