diff --git a/addons/activeblue_ai/controllers/approval.py b/addons/activeblue_ai/controllers/approval.py index d1077e1..0d90cca 100644 --- a/addons/activeblue_ai/controllers/approval.py +++ b/addons/activeblue_ai/controllers/approval.py @@ -10,7 +10,7 @@ _logger = logging.getLogger(__name__) class AiApprovalController(http.Controller): - @http.route('/ai/approval/pending', type='json', auth='user', methods=['GET']) + @http.route('/ai/approval/pending', type='json', auth='user', methods=['POST']) def list_pending(self): if not request.env.user.has_group('activeblue_ai.group_ai_manager'): return {'error': 'Access denied', 'items': []} diff --git a/addons/activeblue_ai/models/ab_ai_bot.py b/addons/activeblue_ai/models/ab_ai_bot.py index 0e1fb11..e628dfd 100644 --- a/addons/activeblue_ai/models/ab_ai_bot.py +++ b/addons/activeblue_ai/models/ab_ai_bot.py @@ -72,7 +72,14 @@ class AbAiBot(models.Model): data = resp.json() if resp.content else {} # Check every required system individually. - checks = {s: data.get(s) == 'ok' for s in self.REQUIRED_SYSTEMS} + # 'warming' for ollama means the model is loading into VRAM but + # Ollama itself is reachable — treat as passing so the bot goes + # online and the model loads on the first real request. + def _passes(system, value): + if system == 'ollama': + return value in ('ok', 'warming') + return value == 'ok' + checks = {s: _passes(s, data.get(s)) for s in self.REQUIRED_SYSTEMS} failing = [s for s, ok in checks.items() if not ok] if not failing: diff --git a/agent_service/tools/odoo_client.py b/agent_service/tools/odoo_client.py index 3f33d6d..62c210f 100644 --- a/agent_service/tools/odoo_client.py +++ b/agent_service/tools/odoo_client.py @@ -45,6 +45,7 @@ class OdooClient: self._pg_dsn = pg_dsn self._pg_pool_min = pg_pool_min self._pg_pool_max = pg_pool_max + self._timeout = XMLRPC_TIMEOUT self._uid = None self._auth_lock = asyncio.Lock() self._pg_pool = None