diff --git a/backend/open_webui/main.py b/backend/open_webui/main.py index 47fbd7a73c..d4f72a3632 100644 --- a/backend/open_webui/main.py +++ b/backend/open_webui/main.py @@ -229,6 +229,7 @@ from open_webui.utils.chat_variables import ( normalize_chat_variables, ) from open_webui.utils.embeddings import generate_embeddings +from open_webui.utils.json_codec import JSONCodec from open_webui.utils.json_response import apply_orjson_http_json from open_webui.utils.logger import start_logger from open_webui.utils.middleware import ( @@ -1842,7 +1843,7 @@ async def passthrough_anthropic_messages(request: Request, form_data: dict, user response = await session.request( method='POST', url=request_url, - data=json.dumps(payload), + data=JSONCodec.dumps(payload), headers=headers, cookies=cookies, ssl=AIOHTTP_CLIENT_SESSION_SSL,