Repository navigation
Conversation
Callers can declare options.result_target (ui_search | agent_search). When omitted, infer it from the credential: cookie-authenticated web UI requests get ui_search, token-authenticated callers (MCP, CLI, scripts) get agent_search. Fixes AIML-3596 Co-Authored-By: Shaun Kaasten <shaun.kaasten@sentry.io>
Co-Authored-By: Shaun Kaasten <shaun.kaasten@sentry.io>
skaasten
marked this pull request as ready for review
September 29, 2026 16:53
skaasten
reviewed
Sep 29, 2026
Co-Authored-By: Shaun Kaasten <shaun.kaasten@sentry.io>
…596-forward-result_target-in-search-agent-start-options # Conflicts: # src/sentry/seer/endpoints/search_agent_start.py Co-Authored-By: shaun.kaasten <shaun.kaasten@sentry.io>
…et-in-search-agent-start-options
skaasten
enabled auto-merge (squash)
October 5, 2026 18:56
shruthilayaj
approved these changes
Oct 5, 2026
skaasten
deleted the
shaunkaasten/aiml-3596-forward-result_target-in-search-agent-start-options
branch
October 5, 2026 19:01
This branch was successfully deployed
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.
The search agent accepts a
result_targetoption (ui_search|agent_search) that selects guidance for the result shapes a caller can use. But/search-agent/start/builds a fixed options dict, so the option never gets forwarded and every caller gets theui_searchdefault. That keeps agent callers like getsentry/sentry-mcp#1342 from getting agent-oriented guidance.This infers
result_targetfrom how the request is authenticated and forwards it:is_frontend_request, i.e. the web UI) getui_search.agent_search.search_agent.result_target.Callers can't set
result_targetthemselves; there's no use case for it yet, and it's easy to add later.result_targetonly changes behavior in code mode, which is enabled by theseer-assisted-query-codemodeflag. The frontend needs no changes.Fixes AIML-3596
via shaun.kaasten.
--
View Junior Session [Sentry]