Fix real_e2e_test max_tokens limit for Volcengine API

Add ConnectorOptions with max_tokens: 4096 to avoid exceeding
Volcengine GLM-4.7's 16384 token limit (Claude CLI defaults to 32000)

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Max 2026-01-31 23:26:11 +08:00
parent 8a138ced41
commit 2e94ce5062

View file

@ -64,6 +64,9 @@ func TestRealClaudeCLIExecution(t *testing.T) {
Model: model,
SystemPrompt: "You are a helpful assistant. Reply concisely.",
Timeout: 3 * time.Minute,
ConnectorOptions: map[string]interface{}{
"max_tokens": 4096, // Limit max_tokens to avoid backend API limits
},
}
t.Logf("Creating executor with options:")
@ -227,6 +230,9 @@ func TestClaudeCLIDirectExecution(t *testing.T) {
ConnectorKey: apiKey,
Model: model,
Timeout: 3 * time.Minute,
ConnectorOptions: map[string]interface{}{
"max_tokens": 4096, // Limit max_tokens to avoid backend API limits
},
}
exec, err := NewExecutor(manager, opts)