From 9685f00c6701a41212413f889abf30c51e2e11a3 Mon Sep 17 00:00:00 2001 From: OhYee Date: Mon, 12 Jan 2026 17:16:51 +0800 Subject: [PATCH] refactor(sandbox): remove network mode validation for CODE_INTERPRETER template type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed the validation logic that prevented CODE_INTERPRETER and AIO template types from using PRIVATE network mode, as this restriction is no longer needed. 移除了阻止CODE_INTERPRETER和AIO模板类型使用PRIVATE网络模式的验证逻辑,因为此限制不再需要。 Change-Id: Ice27c23b6833956f59a863105d9583b29de70076 Signed-off-by: OhYee --- agentrun/sandbox/model.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/agentrun/sandbox/model.py b/agentrun/sandbox/model.py index 8301396..c662771 100644 --- a/agentrun/sandbox/model.py +++ b/agentrun/sandbox/model.py @@ -337,19 +337,6 @@ def validate_template_constraints(self): f"the current disk size is {self.disk_size}" ) - if ( - self.template_type == TemplateType.CODE_INTERPRETER - or self.template_type == TemplateType.AIO - ): - if ( - self.network_configuration - and self.network_configuration.network_mode - == TemplateNetworkMode.PRIVATE - ): - raise ValueError( - "when template_type is CODE_INTERPRETER," - "network_mode cannot be PRIVATE" - ) return self