diff --git a/backend/open_webui/tools/builtin.py b/backend/open_webui/tools/builtin.py index 8af9b52bf7..b8ba62cb89 100644 --- a/backend/open_webui/tools/builtin.py +++ b/backend/open_webui/tools/builtin.py @@ -2899,6 +2899,11 @@ async def upload_file_to_terminal( terminal_url = connection.get('url', '').rstrip('/') + # Route through orchestrator policy endpoint if configured + policy_id = connection.get('policy_id') + if policy_id: + terminal_url = f'{terminal_url}/p/{policy_id}' + # Build auth headers/cookies matching resolve_terminal_tools pattern auth_type = connection.get('auth_type', 'bearer') if auth_type == 'bearer':