mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-13 01:02:25 -06:00
72fdf238a8
Swap the JSON encoder/decoder used across the backend from stdlib json to orjson when ENABLE_ORJSON is set — HTTP request bodies, JSONResponse bodies, upstream provider responses, SSE chunks, and socket.io/Redis payloads. The flag defaults to off, in which case the app uses stdlib json and engineio's codec verbatim, so default behaviour is unchanged. - json_codec exports JSONCodec (stdlib json or the orjson codec) and SOCKETIO_JSON (engineio's codec or the orjson codec); call sites import JSONCodec and stay implementation-agnostic - apply_orjson_http_json() is a no-op when the flag is off, leaving starlette's Request.json / JSONResponse.render untouched - the orjson codec falls back to the stdlib for inputs orjson rejects (non-str dict keys, ints beyond 64 bits, NaN literals) - orjson is imported only when the flag is on - FastAPI(default_response_class=...) is deliberately not used: an explicit default disables the Pydantic direct-to-bytes fast path for response_model routes
60 lines
975 B
Plaintext
60 lines
975 B
Plaintext
# Minimal requirements for backend to run
|
|
# WIP: use this as a reference to build a minimal docker image
|
|
|
|
fastapi==0.136.3
|
|
uvicorn[standard]==0.51.0
|
|
pydantic==2.13.4
|
|
python-multipart==0.0.32
|
|
itsdangerous==2.2.0
|
|
|
|
python-socketio==5.16.2
|
|
orjson==3.11.9
|
|
cryptography
|
|
bcrypt==5.0.0
|
|
argon2-cffi==25.1.0
|
|
PyJWT[crypto]==2.13.0
|
|
authlib==1.7.2
|
|
joserfc==1.7.4
|
|
|
|
requests==2.34.2
|
|
aiohttp==3.13.5 # do not update to 3.13.3 - broken
|
|
async-timeout
|
|
aiocache
|
|
aiofiles
|
|
starlette-compress==1.7.1
|
|
Brotli==1.2.0
|
|
brotlicffi==1.2.0.1
|
|
httpx[socks,http2,zstd,cli,brotli]==0.28.1
|
|
starsessions[redis]==2.2.1
|
|
|
|
sqlalchemy==2.0.50
|
|
aiosqlite==0.22.1
|
|
psycopg[binary]==3.3.4
|
|
alembic==1.18.4
|
|
|
|
pycrdt==0.13.1
|
|
redis
|
|
hiredis
|
|
|
|
APScheduler==3.11.2
|
|
RestrictedPython==8.2
|
|
|
|
loguru==0.7.3
|
|
asgiref==3.11.1
|
|
|
|
mcp==1.27.2
|
|
openai
|
|
|
|
langchain==1.2.10
|
|
langchain-community==0.4.2
|
|
langchain-classic==1.0.7
|
|
langchain-text-splitters==1.1.2
|
|
|
|
fake-useragent==2.2.0
|
|
|
|
chromadb==1.5.9
|
|
black==26.5.1
|
|
pydub
|
|
chardet==7.4.3
|
|
beautifulsoup4
|