Repository navigation
fix: reject unsupported filter conditions when settings load - #213
Merged
Merged
Conversation
AstraBert
approved these changes
Nov 24, 2026
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.
fix: reject unsupported filter conditions when settings load
Problem
Each entry in
FILTERABLE_FIELDShas afield_typeand acondition, but some pairs can't be turned into a Qdrant filter, for examplekeywordwith>,floatwith==, orbooleanwith<. Today the server starts anyway and exposes the field as aqdrant-findparameter. The error only shows up when the model uses that filter:So whoever writes the config never sees the mistake, and the model gets a tool that fails every time it uses that parameter.
Changes
SUPPORTED_CONDITIONSinsettings.pylists the conditions each field type supports, matching whatmake_filteraccepts:keyword:==,!=,any,exceptinteger: all conditionsfloat:>,>=,<,<=boolean:==,!=A validator on
FilterableFieldrejects any other pair when the settings load, so the server doesn't start:A config with an unsupported pair that used to start will now fail at startup. That filter never worked, so this only moves the error to where the config's author can see it.
Testing
tests/test_settings.py:make_filter, so the table can't drift from whatmake_filtersupports.FILTERABLE_FIELDSenv var fails whenQdrantSettingsloads, with the message above.pre-commit(ruff, ruff-format, isort, and mypy) passes.master, a server withkeyword+>starts and fails on the firstqdrant-findthat uses the filter. With this change, it fails at startup with the message above.🤖 Generated with Claude Code