You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2026/07/31 13:19:45 UTC

(shardingsphere) branch master updated: Optimize MCP LLM E2E conversation limits (#39293)

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

terrymanu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 16d51160010 Optimize MCP LLM E2E conversation limits (#39293)
16d51160010 is described below

commit 16d511600103ea6986033526c9e982ec6dbda1d4
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Fri Jul 31 21:19:39 2026 +0800

    Optimize MCP LLM E2E conversation limits (#39293)
    
    * Optimize MCP LLM E2E conversation limits
    
    * Optimize MCP LLM E2E conversation limits
---
 .../apache/shardingsphere/test/e2e/mcp/llm/LLMHttpE2ETest.java    | 8 ++++++--
 .../test/e2e/mcp/llm/conversation/client/LLMChatModelClient.java  | 2 +-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/test/e2e/mcp/src/test/java/org/apache/shardingsphere/test/e2e/mcp/llm/LLMHttpE2ETest.java b/test/e2e/mcp/src/test/java/org/apache/shardingsphere/test/e2e/mcp/llm/LLMHttpE2ETest.java
index 3d9433e9042..4493e2e8db5 100644
--- a/test/e2e/mcp/src/test/java/org/apache/shardingsphere/test/e2e/mcp/llm/LLMHttpE2ETest.java
+++ b/test/e2e/mcp/src/test/java/org/apache/shardingsphere/test/e2e/mcp/llm/LLMHttpE2ETest.java
@@ -67,7 +67,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
 @TestInstance(TestInstance.Lifecycle.PER_CLASS)
 class LLMHttpE2ETest extends AbstractConfigBackedRuntimeE2ETest {
     
-    private static final int MAX_TURNS = 8;
+    private static final int MAX_TURNS = 4;
     
     private static final String DATABASE_NAME = "logic_db";
     
@@ -148,6 +148,8 @@ class LLMHttpE2ETest extends AbstractConfigBackedRuntimeE2ETest {
                 "mask-planning",
                 "The target metadata has already been verified, so do not run separate metadata discovery. Create a reviewable Mask rule plan, without applying it, "
                         + "for the status column of the orders table in the logic_db database and logic_db schema. "
+                        + "Pass database, schema, table, column, operation_type, algorithm_type, and primary_algorithm_properties directly to the planning tool; "
+                        + "omit natural_language_intent and structured_intent_evidence. "
                         + "Use the create operation, KEEP_FIRST_N_LAST_M algorithm, and primary properties first-n=1, last-m=1, replace-char=*. "
                         + "Report the plan ID and explicitly confirm that nothing was applied.",
                 Set.of(PLAN_MASK_RULE_TOOL_NAME),
@@ -268,8 +270,10 @@ class LLMHttpE2ETest extends AbstractConfigBackedRuntimeE2ETest {
                 primaryProperties.putAll(getObjectMap(each.getArguments().get("primary_algorithm_properties")));
             }
         }
-        return DATABASE_NAME.equals(arguments.get("database")) && TABLE_NAME.equals(arguments.get("table")) && "status".equals(arguments.get("column"))
+        return DATABASE_NAME.equals(arguments.get("database")) && DATABASE_NAME.equals(arguments.get("schema"))
+                && TABLE_NAME.equals(arguments.get("table")) && "status".equals(arguments.get("column"))
                 && "create".equals(arguments.get("operation_type")) && "KEEP_FIRST_N_LAST_M".equals(arguments.get("algorithm_type"))
+                && !arguments.containsKey("natural_language_intent") && !arguments.containsKey("structured_intent_evidence")
                 && "1".equals(Objects.toString(primaryProperties.get("first-n"), ""))
                 && "1".equals(Objects.toString(primaryProperties.get("last-m"), ""))
                 && "*".equals(primaryProperties.get("replace-char"));
diff --git a/test/e2e/mcp/src/test/java/org/apache/shardingsphere/test/e2e/mcp/llm/conversation/client/LLMChatModelClient.java b/test/e2e/mcp/src/test/java/org/apache/shardingsphere/test/e2e/mcp/llm/conversation/client/LLMChatModelClient.java
index f2ac6780a15..c99d226ae3c 100644
--- a/test/e2e/mcp/src/test/java/org/apache/shardingsphere/test/e2e/mcp/llm/conversation/client/LLMChatModelClient.java
+++ b/test/e2e/mcp/src/test/java/org/apache/shardingsphere/test/e2e/mcp/llm/conversation/client/LLMChatModelClient.java
@@ -42,7 +42,7 @@ import java.util.stream.Collectors;
 @RequiredArgsConstructor
 public final class LLMChatModelClient {
     
-    private static final int COMPLETION_MAX_TOKENS = 512;
+    private static final int COMPLETION_MAX_TOKENS = 224;
     
     private static final int READINESS_MAX_TOKENS = 64;