mirror of
https://github.com/alibaba/open-code-review.git
synced 2026-08-25 08:32:59 +00:00
feat(config): raise MAX_TOOL_REQUEST_TIMES to 100, minMaxTools to 50
Grouped file review needs more tool call rounds than single-file mode since one RunPerFile call now serves multiple files. Raise the default from 30 to 100 and the user-configurable minimum from 10 to 50.
This commit is contained in:
parent
045fbddcfb
commit
4d7895db97
4 changed files with 7 additions and 7 deletions
|
|
@ -80,12 +80,12 @@ func TestParseReviewFlags_NegativeMaxTools(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestParseReviewFlags_MaxToolsBelowMin(t *testing.T) {
|
||||
opts, err := parseReviewFlags([]string{"--max-tools", "5"})
|
||||
opts, err := parseReviewFlags([]string{"--max-tools", "30"})
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error: %v", err)
|
||||
}
|
||||
if opts.maxTools != 10 {
|
||||
t.Errorf("maxTools = %d, want 10 (clamped to min)", opts.maxTools)
|
||||
if opts.maxTools != 50 {
|
||||
t.Errorf("maxTools = %d, want 50 (clamped to min)", opts.maxTools)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ func validateReviewOptions(opts *reviewOptions) error {
|
|||
if err := validateAudience(opts.audience); err != nil {
|
||||
return err
|
||||
}
|
||||
const minMaxTools = 10
|
||||
const minMaxTools = 50
|
||||
if opts.maxTools < 0 {
|
||||
return fmt.Errorf("--max-tools must be a non-negative integer (0 means use template default)")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
{ "role": "user", "prompt_file": "grouping_task_user.md" }
|
||||
]
|
||||
},
|
||||
"MAX_TOOL_REQUEST_TIMES": 30,
|
||||
"MAX_TOOL_REQUEST_TIMES": 100,
|
||||
"PLAN_MODE_LINE_THRESHOLD": 50,
|
||||
"MAX_REVIEW_ROUNDS": 2,
|
||||
"MAX_TOKENS": 58888
|
||||
|
|
|
|||
|
|
@ -99,8 +99,8 @@ func TestLoadDefault_FieldsPopulated(t *testing.T) {
|
|||
if tpl.MaxTokens != 58888 {
|
||||
t.Errorf("MaxTokens = %d, want 58888", tpl.MaxTokens)
|
||||
}
|
||||
if tpl.MaxToolRequestTimes != 30 {
|
||||
t.Errorf("MaxToolRequestTimes = %d, want 30", tpl.MaxToolRequestTimes)
|
||||
if tpl.MaxToolRequestTimes != 100 {
|
||||
t.Errorf("MaxToolRequestTimes = %d, want 100", tpl.MaxToolRequestTimes)
|
||||
}
|
||||
if tpl.PlanModeLineThreshold != 50 {
|
||||
t.Errorf("PlanModeLineThreshold = %d, want 50", tpl.PlanModeLineThreshold)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue