Merge pull request #83 from 0xbyt4/fix/cli-save-config-string-model

fix(cli): prevent crash in save_config_value when model is a string
This commit is contained in:
Teknium 2026-02-27 03:36:39 -08:00 committed by GitHub
commit 8174f5a988
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

2
cli.py
View file

@ -731,7 +731,7 @@ def save_config_value(key_path: str, value: any) -> bool:
keys = key_path.split('.')
current = config
for key in keys[:-1]:
if key not in current:
if key not in current or not isinstance(current[key], dict):
current[key] = {}
current = current[key]
current[keys[-1]] = value