DEV-14675 - LLM 'filter-search/' API endpoint#4689
Open
gregrholden wants to merge 19 commits into
Open
Conversation
…t-lookup-tool' into dev-14679-implement-search-assistant
…t-lookup-tool' into ftr/DEV-14675-llm-filter-search-endpoint
…es, and meet DRY reqs
…5-llm-filter-search-endpoint
zachflanders-frb
requested changes
Jul 13, 2026
zachflanders-frb
left a comment
Contributor
There was a problem hiding this comment.
This is looking good, I especially like the improvements around getting the text messages from response content. I have a few comments for consideration:
…m_message to assistant and ended_at prop to Session. Updated LLMBase to use None for ID when error occurs.
…t-lookup-tool' into ftr/DEV-14675-llm-filter-search-endpoint
…er-search-endpoint
…5-llm-filter-search-endpoint
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.
Description:
DEV-14675 This is the initial implementation for the
/api/v2/llm/filter-search/endpoint.NOTES:
Technical Details.Technical Details:
Branch is based off
dev-14679-implement-search-assistant(currently in PR).Branch
ftr/DEV-15167-implement-recipient-lookup-toolwas merged into this branch for additional tooling (that branch is also currently in PR).Code Updates:
llm/v2/urls.pywas updated with the route for the endpoint.llm/v2/views/filter_search.pywas created, defining the endpoint’s baseline behavior.llm/v2/views/llm_base.pywas updated with high-level methods that can be shared by future LLM views.llm/tests/integration/test_filter_search.pywas created to provide test coverage for the endpoint’s baseline behaviors.llm/fixtures/prompts.yamlhad a typo fixed (line 7: “additonal” to “additional”).llm/assistants/filter_search.pywas updated to provide more robust error handling, logging, and performance.Assumptions:
LLMAPIKeyHandler.require_api_keyis complete and ready for use as a decorator on the post() method of the endpoint.LLMBasevariable that can be overridden by an env variable.agency_base.py(line 76), before proceeding with prompting the LLM.filter_search_assistant.pyformulation is as complete as needed for this endpoint’s initial behavior with the LLM/tools.Requirements for PR Merge:
Explain N/A in above checklist: