bug fix for security initial cause can't save model in launcher (#1952)

This commit is contained in:
Cytown 2026-03-24 16:24:12 +08:00 committed by GitHub
parent 6e31f15467
commit d921bbb667
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -1946,6 +1946,7 @@ func SaveConfig(path string, cfg *Config) error {
if err != nil { if err != nil {
return err return err
} }
logger.Infof("saving config to %s", path)
return fileutil.WriteFileAtomic(path, data, 0o600) return fileutil.WriteFileAtomic(path, data, 0o600)
} }

View file

@ -31,7 +31,7 @@ type SecurityConfig struct {
// Model API keys. Map key is model_name, can include suffix like "abc:0", "abc:1" // Model API keys. Map key is model_name, can include suffix like "abc:0", "abc:1"
// for load balancing with same model_name. The suffix ":N" is used to distinguish // for load balancing with same model_name. The suffix ":N" is used to distinguish
// multiple configs that share the same base model_name. // multiple configs that share the same base model_name.
ModelList map[string]ModelSecurityEntry `yaml:"model_list,omitempty"` ModelList map[string]ModelSecurityEntry `yaml:"model_list"`
// Channel tokens/secrets // Channel tokens/secrets
Channels *ChannelsSecurity `yaml:"channels,omitempty"` Channels *ChannelsSecurity `yaml:"channels,omitempty"`