Skip to content

Commit 353a170

Browse files
committed
fix(conf): fix default_model when no -write flag
1 parent d1e8590 commit 353a170

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

conf/read.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ func ReadYAMLData(yml []byte, noAPIKey bool, extra, start string) (*Cfg, error)
5353
}
5454

5555
cfg.trimParamValues()
56+
cfg.fixDefaultModel()
5657

5758
// concatenate host and ports => addr = "host:port"
5859
listen := make(map[string]string, len(cfg.Listen))

conf/write.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ func (cfg *Cfg) WriteGoinferYML(debug, noAPIKey bool) error {
3838
func (cfg *Cfg) WriteBytes(debug, noAPIKey bool) ([]byte, error) {
3939
cfg.setAPIKey(debug, noAPIKey)
4040
cfg.applyEnvVars()
41-
cfg.fixDefaultModel()
4241
cfg.trimParamValues()
42+
cfg.fixDefaultModel()
4343

4444
err := cfg.validate(noAPIKey)
4545

0 commit comments

Comments
 (0)