mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-17 15:53:59 -06:00
fix: a coding agent's error shows a technical dump with the whole system prompt (#34173)
When the terminal refused to start a coding agent, for example because the system prompt was longer than Open Terminal accepts, the error under the reply was a technical dump of that refusal with the whole system prompt in it. Such a refusal now shows "Agent environment request failed". Refusals the terminal explains in plain words, such as another reply still running in the chat, keep showing that reason. Fixes #34172
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user