diff --git a/backend/open_webui/env.py b/backend/open_webui/env.py index dc160e1592..275e254957 100644 --- a/backend/open_webui/env.py +++ b/backend/open_webui/env.py @@ -159,7 +159,7 @@ ENABLE_DB_MIGRATIONS = os.getenv('ENABLE_DB_MIGRATIONS', 'True').lower() == 'tru # Swap the JSON encoder/decoder used across the app (HTTP request bodies, JSONResponse # bodies, upstream provider responses, socket.io payloads) from the stdlib `json` module # to orjson. Faster, but stricter: see open_webui/utils/json_codec.py for the differences. -ENABLE_ORJSON = os.getenv('ENABLE_ORJSON', 'False').lower() == 'true' +ENABLE_ORJSON = os.getenv('ENABLE_ORJSON', 'True').lower() == 'true' # Function to parse each section diff --git a/backend/open_webui/main.py b/backend/open_webui/main.py index ab9387e47f..694c62a543 100644 --- a/backend/open_webui/main.py +++ b/backend/open_webui/main.py @@ -502,7 +502,7 @@ async def lifespan(app: FastAPI): await publish_event(app, EVENTS.SYSTEM_SHUTDOWN_COMPLETED, source='system') -# Opt-in (ENABLE_ORJSON): orjson for request-body parsing and JSONResponse bodies; +# ENABLE_ORJSON: orjson for request-body parsing and JSONResponse bodies; # response_model routes keep FastAPI's Pydantic fast path either way. apply_orjson_http_json()