This is an automated email from the ASF dual-hosted git repository.

wenjin272 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-agents.git


The following commit(s) were added to refs/heads/main by this push:
     new c16d41af [fix] Update flink version constraint.
c16d41af is described below

commit c16d41af3f8b87009c0bf3e03c4440d90b230b16
Author: WenjinXie <[email protected]>
AuthorDate: Thu May 7 10:43:03 2026 +0800

    [fix] Update flink version constraint.
---
 .../src/main/java/org/apache/flink/agents/plan/actions/Utils.java | 2 +-
 .../vector_store_cross_language_agent.py                          | 4 +---
 python/flink_agents/plan/actions/utils.py                         | 2 +-
 .../flink/agents/runtime/operator/ActionExecutionOperator.java    | 8 ++++++--
 4 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/plan/src/main/java/org/apache/flink/agents/plan/actions/Utils.java 
b/plan/src/main/java/org/apache/flink/agents/plan/actions/Utils.java
index 1f1a3c66..87c63d69 100644
--- a/plan/src/main/java/org/apache/flink/agents/plan/actions/Utils.java
+++ b/plan/src/main/java/org/apache/flink/agents/plan/actions/Utils.java
@@ -30,7 +30,7 @@ public final class Utils {
     private static final Logger LOG = LoggerFactory.getLogger(Utils.class);
     private static final String DEFAULT_VALUE = "<unknown>";
     public static final List<String> requiredVersions =
-            List.of("1.20.3", "2.0.1", "2.1.1", "2.2.0");
+            List.of("1.20.4", "2.0.1", "2.1.1", "2.2.0");
 
     static final Versions INSTANCE = new Versions();
 
diff --git 
a/python/flink_agents/e2e_tests/e2e_tests_resource_cross_language/vector_store_cross_language_agent.py
 
b/python/flink_agents/e2e_tests/e2e_tests_resource_cross_language/vector_store_cross_language_agent.py
index a69d1633..2b7c63ff 100644
--- 
a/python/flink_agents/e2e_tests/e2e_tests_resource_cross_language/vector_store_cross_language_agent.py
+++ 
b/python/flink_agents/e2e_tests/e2e_tests_resource_cross_language/vector_store_cross_language_agent.py
@@ -181,9 +181,7 @@ class VectorStoreCrossLanguageAgent(Agent):
                 # ES is eventually consistent; allow a few retries.
                 retry_time = 0
                 filtered_docs = vector_store.query(filtered_query).documents
-                while (
-                    len(filtered_docs) != 1 and retry_time < MAX_RETRIES_TIMES
-                ):
+                while len(filtered_docs) != 1 and retry_time < 
MAX_RETRIES_TIMES:
                     retry_time += 1
                     time.sleep(2)
                     filtered_docs = 
vector_store.query(filtered_query).documents
diff --git a/python/flink_agents/plan/actions/utils.py 
b/python/flink_agents/plan/actions/utils.py
index f8326044..30f24a03 100644
--- a/python/flink_agents/plan/actions/utils.py
+++ b/python/flink_agents/plan/actions/utils.py
@@ -27,7 +27,7 @@ from packaging import version as pkg_version
 # The async execution for cross language resource
 # is not supported.
 UNSUPPORTED_RANGES: List[Tuple[str, str]] = [
-    ("1.0.0", "1.20.3"),
+    ("1.0.0", "1.20.4"),
     ("2.0.0", "2.0.1"),
     ("2.1.0", "2.1.1"),
     ("2.2.0", "2.2.0"),
diff --git 
a/runtime/src/main/java/org/apache/flink/agents/runtime/operator/ActionExecutionOperator.java
 
b/runtime/src/main/java/org/apache/flink/agents/runtime/operator/ActionExecutionOperator.java
index c2228872..f719f391 100644
--- 
a/runtime/src/main/java/org/apache/flink/agents/runtime/operator/ActionExecutionOperator.java
+++ 
b/runtime/src/main/java/org/apache/flink/agents/runtime/operator/ActionExecutionOperator.java
@@ -693,13 +693,17 @@ public class ActionExecutionOperator<IN, OUT> extends 
AbstractStreamOperator<OUT
                         && 
config.get(LongTermMemoryOptions.Mem0.EMBEDDING_MODEL_SETUP) != null
                         && config.get(LongTermMemoryOptions.Mem0.VECTOR_STORE) 
!= null;
 
+        boolean containJavaAction =
+                agentPlan.getActions().values().stream()
+                        .anyMatch(action -> action.getExec() instanceof 
JavaFunction);
+
         // Mem0 will call chat model and embedding model in its own thread 
executor, this behavior
         // is same as the async execution for cross-language resources, and 
also requires the fix
         // in pemja.
-        if (configured && !supportAsync()) {
+        if (configured && containJavaAction && !supportAsync()) {
             throw new RuntimeException(
                     String.format(
-                            "Using Mem0 based Long-Term Memory in java 
requires flink version higher"
+                            "Using Mem0 based Long-Term Memory in java 
requires flink version higher "
                                     + "than %s. You can upgrade flink or use 
python api.",
                             requiredVersions));
         }

Reply via email to