You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Metadata filters crash on keys containing dots or other special characters #3179
Filtering seeds or message pieces by a prompt_metadata key that contains a dot (or any character outside a plain SQL bind name, like a hyphen or a space) crashes the query instead of filtering.
In sqlite_memory.py and azure_sql_memory.py, _get_seed_metadata_conditions and _get_message_pieces_prompt_metadata_conditions build the SQL with the key interpolated into both the JSON path and the bind parameter name:
For a key like a.b, SQLAlchemy parses :a.b as a parameter named a followed by literal text, so the later bindparams() call raises ArgumentError: This text() construct doesn't define a bound parameter named 'a.b'.
This is the same class of problem #3063 fixed for memory labels, where the accepted fix quotes the JSON path and uses indexed parameter names.
Main now has literal key matching for metadata filters on both backends from #3125, so the crash and the mismatch described here are resolved there. Closing the fix PR that predates it.
Fixed by #3125, which adds literal metadata-key matching for SQLite and Azure SQL. #3180 adds regression coverage for special-character keys, retrieval, and seed/group removal. Both PRs are merged into main. Closing as completed.
Activity
ManoharPaturi commentedon Oct 15, 2026
Main now has literal key matching for metadata filters on both backends from #3125, so the crash and the mismatch described here are resolved there. Closing the fix PR that predates it.
romanlutz commentedon Oct 20, 2026
Fixed by #3125, which adds literal metadata-key matching for SQLite and Azure SQL. #3180 adds regression coverage for special-character keys, retrieval, and seed/group removal. Both PRs are merged into main. Closing as completed.