router-for-me/CLIProxyAPI · error
config payload is empty
Error message
config payload is empty
What it means
Error "config payload is empty" thrown in router-for-me/CLIProxyAPI.
Source
Thrown at internal/config/parse.go:16
package config
import (
"fmt"
"strings"
log "github.com/sirupsen/logrus"
"golang.org/x/crypto/bcrypt"
"gopkg.in/yaml.v3"
)
// ParseConfigBytes parses a YAML configuration payload into Config and applies the same
// in-memory normalizations as LoadConfigOptional, without persisting any changes to disk.
func ParseConfigBytes(data []byte) (*Config, error) {
if len(data) == 0 {
return nil, fmt.Errorf("config payload is empty")
}
if errValidate := validateCredentialWeightYAML(data); errValidate != nil {
return nil, errValidate
}
var cfg Config
// Keep defaults aligned with LoadConfigOptional.
cfg.Host = "" // Default empty: binds to all interfaces (IPv4 + IPv6)
cfg.LoggingToFile = false
cfg.LogsMaxTotalSizeMB = 0
cfg.ErrorLogsMaxFiles = 10
cfg.UsageStatisticsEnabled = false
cfg.RedisUsageQueueRetentionSeconds = 60
cfg.DisableCooling = false
cfg.SaveCooldownStatus = false
cfg.TransientErrorCooldownSeconds = 0
cfg.DisableImageGeneration = DisableImageGenerationOffView on GitHub (pinned to 78f0c4079e)
Solutions
- Provide a non-empty configuration payload to the parser.
- Verify the config file exists and contains content before loading.
When it happens
Trigger: Thrown at internal/config/parse.go:16 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of router-for-me/CLIProxyAPI@78f0c4079e (2026-08-15).
Data as JSON: /api/errors/d66f98c7154929a2.
Report an issue: GitHub.