Commit 021f6f6
fix(sessions): apply after_timestamp and num_recent_events together in VertexAiSessionService
Previously, `get_session` sent the server-side `timestamp>=` filter only when `num_recent_events` was unset, so setting both `GetSessionConfig` filters silently dropped the timestamp one.
This CL sends `after_timestamp` to the server whenever it is set and still trims to `num_recent_events` client-side, so both filters now compose.
Every other ADK session service already applies both filters together -- the in-memory, database and sqlite services here, and the Vertex services in the Go/JS/Kotlin/Java ports; this was the last one out of parity.
PiperOrigin-RevId: 9528186841 parent 481fe21 commit 021f6f6
2 files changed
Lines changed: 21 additions & 1 deletion
File tree
- src/google/adk/sessions
- tests/unittests/sessions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
| 239 | + | |
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| |||
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
796 | 796 | | |
797 | 797 | | |
798 | 798 | | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
799 | 819 | | |
800 | 820 | | |
801 | 821 | | |
| |||
0 commit comments