fix timeout

This commit is contained in:
lpf
2026-02-14 11:50:21 +08:00
parent 64f84678cb
commit af6da309ec
5 changed files with 24 additions and 14 deletions

View File

@@ -39,6 +39,9 @@ func Validate(cfg *Config) []error {
if cfg.Providers.Proxy.APIBase == "" {
errs = append(errs, fmt.Errorf("providers.proxy.api_base is required"))
}
if cfg.Providers.Proxy.TimeoutSec <= 0 {
errs = append(errs, fmt.Errorf("providers.proxy.timeout_sec must be > 0"))
}
if cfg.Gateway.Port <= 0 || cfg.Gateway.Port > 65535 {
errs = append(errs, fmt.Errorf("gateway.port must be in 1..65535"))