Fix config validation edge cases

This commit is contained in:
2026-07-03 18:56:35 +00:00
parent 4477b13203
commit fd835b582c
6 changed files with 222 additions and 34 deletions

View File

@@ -58,15 +58,6 @@ func validateLLMProfiles(profiles map[string]LLMProfile) error {
if profile.MaxConcurrency < 0 {
return fmt.Errorf("LLM profile %q max concurrency must not be negative", id)
}
if profile.TimeoutSeconds == 0 && profile.MaxRetries == 0 && profile.MaxConcurrency == 0 {
continue
}
if profile.TimeoutSeconds == 0 {
return fmt.Errorf("LLM profile %q timeout seconds must be greater than zero", id)
}
if profile.MaxConcurrency == 0 {
return fmt.Errorf("LLM profile %q max concurrency must be greater than zero", id)
}
}
return nil
}