diff --git a/agixt/db/Agent.py b/agixt/db/Agent.py index 5a3070c88631..73f0f9c01cda 100644 --- a/agixt/db/Agent.py +++ b/agixt/db/Agent.py @@ -439,6 +439,8 @@ def _update_provider_settings(self, agent_provider, new_config): ) if not setting: setting = ProviderSetting(provider_id=provider.id, name=setting_name) + self.session.add(setting) + self.session.flush() try: agent_provider_setting = ( self.session.query(AgentProviderSetting)