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:
parent
8a138ced41
commit
2e94ce5062
1 changed files with 6 additions and 0 deletions
|
|
@ -64,6 +64,9 @@ func TestRealClaudeCLIExecution(t *testing.T) {
|
||||||
Model: model,
|
Model: model,
|
||||||
SystemPrompt: "You are a helpful assistant. Reply concisely.",
|
SystemPrompt: "You are a helpful assistant. Reply concisely.",
|
||||||
Timeout: 3 * time.Minute,
|
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:")
|
t.Logf("Creating executor with options:")
|
||||||
|
|
@ -227,6 +230,9 @@ func TestClaudeCLIDirectExecution(t *testing.T) {
|
||||||
ConnectorKey: apiKey,
|
ConnectorKey: apiKey,
|
||||||
Model: model,
|
Model: model,
|
||||||
Timeout: 3 * time.Minute,
|
Timeout: 3 * time.Minute,
|
||||||
|
ConnectorOptions: map[string]interface{}{
|
||||||
|
"max_tokens": 4096, // Limit max_tokens to avoid backend API limits
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
exec, err := NewExecutor(manager, opts)
|
exec, err := NewExecutor(manager, opts)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue