sipeed/picoclaw · error
backup before reset: %w
Error message
backup before reset: %w
What it means
Error "backup before reset: %w" thrown in sipeed/picoclaw.
Source
Thrown at pkg/config/config.go:1769
// Note: Multiple entries with the same model_name are allowed for load balancing.
func (c *Config) ValidateModelList() error {
for i := range c.ModelList {
if err := c.ModelList[i].Validate(); err != nil {
return fmt.Errorf("model_list[%d]: %w", i, err)
}
}
return nil
}
func (c *Config) SecurityCopyFrom(path string) error {
return loadSecurityConfig(c, securityPath(path))
}
// ResetToDefaults backs up the current config, creates a default config,
// preserves security credentials from the existing config, and saves it.
func ResetToDefaults(configPath string) error {
if err := MakeBackup(configPath); err != nil {
return fmt.Errorf("backup before reset: %w", err)
}
cfg := DefaultConfig()
cfg.Session.ApplyDmScope()
cfg.Session.DeriveDmScope()
if err := cfg.SecurityCopyFrom(configPath); err != nil {
logger.WarnF("could not preserve security config", map[string]any{"error": err})
}
return SaveConfig(configPath, cfg)
}
func expandMultiKeyModels(models []*ModelConfig) []*ModelConfig {
var expanded []*ModelConfig
for _, m := range models {
keys := m.APIKeys.Values()
// Single key or no keys: keep as-is
if len(keys) <= 1 {View on GitHub (pinned to 49183d7e8d)
When it happens
Trigger: Thrown at pkg/config/config.go:1769 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15).
Data as JSON: /api/errors/6ecc719ea0e06686.
Report an issue: GitHub.