From 3608491419be160503250436fc6d8a1933747b9e Mon Sep 17 00:00:00 2001 From: Dillon DuPont Date: Mon, 28 Apr 2025 21:53:58 -0400 Subject: [PATCH] fix uitars oai provider --- .../agent/agent/providers/uitars/clients/oaicompat.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libs/agent/agent/providers/uitars/clients/oaicompat.py b/libs/agent/agent/providers/uitars/clients/oaicompat.py index 4567360b..963fb05b 100644 --- a/libs/agent/agent/providers/uitars/clients/oaicompat.py +++ b/libs/agent/agent/providers/uitars/clients/oaicompat.py @@ -94,8 +94,15 @@ class OAICompatClient(BaseUITarsClient): """ headers = {"Content-Type": "application/json", "Authorization": f"Bearer {self.api_key}"} - final_messages = [{"role": "system", "content": system}] - + final_messages = [ + { + "role": "system", + "content": [ + { "type": "text", "text": system } + ] + } + ] + # Process messages for item in messages: if isinstance(item, dict):