diff --git a/backend/open_webui/utils/agents/transport.py b/backend/open_webui/utils/agents/transport.py index 5a189f7fca..3dcfb50a58 100644 --- a/backend/open_webui/utils/agents/transport.py +++ b/backend/open_webui/utils/agents/transport.py @@ -51,7 +51,8 @@ class TerminalTransport: ) as response: data = await response.json() if response.status >= 400: - raise ValueError(data.get('detail', 'Agent environment request failed')) + detail = data.get('detail') + raise ValueError(detail if isinstance(detail, str) else 'Agent environment request failed') return data async def start(self, provider, options):