fix(support-chat): preserve provider catalog in isolated runtime
Deploy Canina / deploy (push) Successful in 30s
Deploy Canina / deploy (push) Successful in 30s
This commit is contained in:
1 parent
d2c227c733
commit
240a176151
1 file changed
+10
-1
@@ -9,7 +9,16 @@ import hermes_yaml as yaml
|
||||
source = yaml.safe_load(Path('/opt/data/config.yaml').read_text())
|
||||
home = Path('/run/canina-support')
|
||||
home.mkdir(mode=0o700, exist_ok=True)
|
||||
safe = {'model': source.get('model', {}), 'web': source.get('web', {}), 'memory': {'memory_enabled': False, 'user_profile_enabled': False}, 'telemetry': {'shared_metrics': {'enabled': False, 'send': False}}, 'agent': {'max_iterations': 2}, 'compression': {'enabled': False}}
|
||||
safe = {
|
||||
'model': source.get('model', {}),
|
||||
# Provider names/models are configuration; credentials remain in env.
|
||||
'custom_providers': source.get('custom_providers', []),
|
||||
'web': source.get('web', {}),
|
||||
'memory': {'memory_enabled': False, 'user_profile_enabled': False},
|
||||
'telemetry': {'shared_metrics': {'enabled': False, 'send': False}},
|
||||
'agent': {'max_iterations': 2},
|
||||
'compression': {'enabled': False},
|
||||
}
|
||||
p = home/'config.yaml'
|
||||
p.write_text(yaml.safe_dump(safe)); p.chmod(0o600)
|
||||
os.environ['HERMES_HOME']=str(home)
|
||||
|
||||
Reference in new issue
Block a user