Skip to content

Commit 8e87eba

Browse files
committed
fix: ensure Redis Tag version operator uses string values
Convert version parameter to string for Redis Tag operator compatibility. The Redis Tag operator requires string values for comparison operations.
1 parent 4f990f1 commit 8e87eba

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

langgraph/checkpoint/redis/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ def get_channel_values(
539539
filter_expression=(Tag("thread_id") == storage_safe_thread_id)
540540
& (Tag("checkpoint_ns") == storage_safe_checkpoint_ns)
541541
& (Tag("channel") == channel)
542-
& (Tag("version") == version),
542+
& (Tag("version") == str(version)),
543543
return_fields=["type", "$.blob"],
544544
num_results=1,
545545
)

langgraph/checkpoint/redis/aio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,7 @@ async def aget_channel_values(
957957
filter_expression=(Tag("thread_id") == storage_safe_thread_id)
958958
& (Tag("checkpoint_ns") == storage_safe_checkpoint_ns)
959959
& (Tag("channel") == channel)
960-
& (Tag("version") == version),
960+
& (Tag("version") == str(version)),
961961
return_fields=["type", "$.blob"],
962962
num_results=1,
963963
)

langgraph/checkpoint/redis/ashallow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ async def aget_channel_values(
629629
filter_expression=(Tag("thread_id") == thread_id)
630630
& (Tag("checkpoint_ns") == checkpoint_ns)
631631
& (Tag("channel") == channel)
632-
& (Tag("version") == version),
632+
& (Tag("version") == str(version)),
633633
return_fields=["type", "$.blob"],
634634
num_results=1,
635635
)

langgraph/checkpoint/redis/shallow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ def get_channel_values(
641641
filter_expression=(Tag("thread_id") == thread_id)
642642
& (Tag("checkpoint_ns") == checkpoint_ns)
643643
& (Tag("channel") == channel)
644-
& (Tag("version") == version),
644+
& (Tag("version") == str(version)),
645645
return_fields=["type", "$.blob"],
646646
num_results=1,
647647
)

0 commit comments

Comments
 (0)