From e2ad7d7fb6bda51fdba992e90d7c434bbf4b199d Mon Sep 17 00:00:00 2001 From: Alex Blank Date: Fri, 22 May 2026 21:49:31 +0000 Subject: [PATCH] fix: prevent null default_port for terminal tools --- apps/api/src/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/api/src/main.py b/apps/api/src/main.py index 1bd58cf..06fe5dd 100644 --- a/apps/api/src/main.py +++ b/apps/api/src/main.py @@ -185,6 +185,7 @@ services: "category": "ai-assistant", "interface_type": "terminal", "requires_port": False, + "default_port": 0, "compose_template": """version: "3.8" services: opencode: @@ -247,7 +248,8 @@ volumes: existing.definition_type = "compose" existing.compose_template = tool_data["compose_template"] existing.required_variables = tool_data["required_variables"] - existing.default_port = tool_data.get("default_port") + if "default_port" in tool_data: + existing.default_port = tool_data["default_port"] logger.info("Updated built-in tool type: %s", tool_data["name"]) await session.commit()