Commit graph

16202 commits

Author SHA1 Message Date
Claude
6bda95d3bd
fix(db): patch SQLAlchemy ↔ aiosqlite ≥0.20 terminate_force_close incompatibility
SQLAlchemy 2.0.36+ added a `terminate_force_close()` path on its
async DB-API adapters, used by the connection pool when a connection
must be invalidated immediately (typically when an in-flight query
was cancelled — request aborted by client, timeout, etc.).

For the aiosqlite dialect, `_terminate_force_close` unconditionally
accesses `self._connection.stop`. That attribute existed on
`aiosqlite.Connection` up to 0.18 (where Connection sub-classed
`threading.Thread`) and was removed in 0.20+ when the worker model
was refactored.

On the version pin Open WebUI ships (sqlalchemy 2.0.48 + aiosqlite
0.21.0) every cancelled aiosqlite call therefore produces a
multi-page

  NotImplementedError: terminate_force_close() not implemented by this DBAPI shim

ERROR traceback, drowning real errors in noise even though the
underlying connection is correctly torn down by aiosqlite's own
worker on the next loop tick.

Add `internal/_aiosqlite_compat.install()` which monkey-patches the
shim to understand both APIs:

  * aiosqlite ≤ 0.18 — call `Connection.stop()` as before.
  * aiosqlite ≥ 0.20 — flip the worker thread's `_running` flag so it
    exits on the next iteration (the same end-state the original code
    achieved on the old API).
  * Anything else — log at debug and fall back to GC.

The patch is idempotent, runs once at db.py import time before the
async engine is created, and is a no-op on installations whose
SQLAlchemy doesn't ship the affected symbol — so it won't break
future upstream rewrites.

https://claude.ai/code/session_01JSr4NZSskEUQvoJnavVXh8
2026-04-14 12:35:19 +00:00
Timothy Jaeryang Baek
37658fd541 refac 2026-04-14 01:17:39 -05:00
Timothy Jaeryang Baek
cced77b584 refac 2026-04-14 00:07:50 -05:00
Timothy Jaeryang Baek
f685edd161 refac 2026-04-13 23:40:09 -05:00
Timothy Jaeryang Baek
18fe17127a refac 2026-04-13 23:33:58 -05:00
Timothy Jaeryang Baek
a209f7f6e0 refac 2026-04-13 23:23:49 -05:00
Timothy Jaeryang Baek
45e49d33e5 refac 2026-04-13 21:52:19 -05:00
Timothy Jaeryang Baek
9a8c4da67d chore: deps bump 2026-04-13 21:46:32 -05:00
Timothy Jaeryang Baek
39ea7bf63d chore: dep bump 2026-04-13 21:45:17 -05:00
Timothy Jaeryang Baek
84ec43105c refac 2026-04-13 21:33:43 -05:00
Timothy Jaeryang Baek
cf4218e688 refac 2026-04-13 21:29:03 -05:00
Algorithm5838
33a4d1b412
fix: image url to base64 conversion (#23685)
Some checks are pending
Create and publish Docker images with specific build args / build-main-image (linux/amd64, ubuntu-latest) (push) Waiting to run
Create and publish Docker images with specific build args / build-main-image (linux/arm64, ubuntu-24.04-arm) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/amd64, ubuntu-latest) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/arm64, ubuntu-24.04-arm) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda126-image (linux/amd64, ubuntu-latest) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda126-image (linux/arm64, ubuntu-24.04-arm) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/amd64, ubuntu-latest) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/arm64, ubuntu-24.04-arm) (push) Waiting to run
Create and publish Docker images with specific build args / build-slim-image (linux/amd64, ubuntu-latest) (push) Waiting to run
Create and publish Docker images with specific build args / build-slim-image (linux/arm64, ubuntu-24.04-arm) (push) Waiting to run
Create and publish Docker images with specific build args / merge-main-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-cuda-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-cuda126-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-ollama-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-slim-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / copy-to-dockerhub (, main) (push) Blocked by required conditions
Create and publish Docker images with specific build args / copy-to-dockerhub (-cuda, cuda) (push) Blocked by required conditions
Create and publish Docker images with specific build args / copy-to-dockerhub (-cuda126, cuda126) (push) Blocked by required conditions
Create and publish Docker images with specific build args / copy-to-dockerhub (-ollama, ollama) (push) Blocked by required conditions
Create and publish Docker images with specific build args / copy-to-dockerhub (-slim, slim) (push) Blocked by required conditions
Python CI / Format Backend (push) Waiting to run
Frontend Build / Format & Build Frontend (push) Waiting to run
Frontend Build / Frontend Unit Tests (push) Waiting to run
2026-04-13 19:15:22 -05:00
Timothy Jaeryang Baek
c8ef7b0289 refac 2026-04-13 18:51:20 -05:00
Timothy Jaeryang Baek
c767bcaa73 refac 2026-04-13 18:20:46 -05:00
Timothy Jaeryang Baek
2943955c52 refac 2026-04-13 17:54:08 -05:00
Timothy Jaeryang Baek
715cf9797a refac 2026-04-13 16:25:44 -05:00
Classic298
8979987eed
fix: drop extra='allow' on FolderForm and FolderUpdateForm (#23648)
* fix: drop extra='allow' on FolderForm and FolderUpdateForm

These request models were configured to accept arbitrary extra fields,
which were then merged into the folder row via form_data.model_dump().
In insert_new_folder the server-assigned user_id is placed before the
form spread, so a client-supplied user_id in the request body would
override it and the folder would be persisted against another account.

Strictly typed inputs are the correct shape for these endpoints — the
client has no legitimate reason to send fields beyond the declared
ones, and dropping extra='allow' closes the mass-assignment sink at
the validation layer instead of relying on every callsite to merge
fields in the right order.

* fix: reject unknown fields on FolderForm and FolderUpdateForm

Address review feedback: dropping extra='allow' fell back to Pydantic
v2's default extra='ignore', which only silently drops unknown fields
instead of rejecting them. The intent for these request models is a
strict input contract — fail fast when a client sends anything the
server does not expect — so explicitly set extra='forbid'. This also
makes the hardening visible in the form definition rather than implicit
in the default.
2026-04-13 16:14:00 -05:00
Timothy Jaeryang Baek
cd55c3e212 refac 2026-04-13 16:03:51 -05:00
Timothy Jaeryang Baek
8dba798cce refac 2026-04-13 16:03:36 -05:00
Timothy Jaeryang Baek
9dccd29c94 refac 2026-04-13 16:00:03 -05:00
Timothy Jaeryang Baek
026903399b refac 2026-04-13 15:58:33 -05:00
G30
2991d9f1f0
fix(ui): automatically close channel input more menu dropdown dynamically on file interactions (#23684) 2026-04-13 15:57:12 -05:00
Timothy Jaeryang Baek
611fe0c8a9 refac 2026-04-13 15:14:55 -05:00
Timothy Jaeryang Baek
31406caa79 refac 2026-04-13 15:13:14 -05:00
Timothy Jaeryang Baek
9c64d84ad9 refac 2026-04-13 15:03:22 -05:00
Timothy Jaeryang Baek
40f5b3d135 refac 2026-04-13 14:51:09 -05:00
Timothy Jaeryang Baek
869cf9e848 refac 2026-04-13 14:33:23 -05:00
Timothy Jaeryang Baek
2ddcb30b9a refac 2026-04-13 14:29:27 -05:00
Timothy Jaeryang Baek
96265cf042 refac 2026-04-13 14:19:15 -05:00
Timothy Jaeryang Baek
050c4b97a9 refac 2026-04-13 14:13:03 -05:00
Timothy Jaeryang Baek
d0188f3fe1 refac 2026-04-13 14:08:58 -05:00
Timothy Jaeryang Baek
45f45f5bba chore: bump dep 2026-04-13 13:49:28 -05:00
Timothy Jaeryang Baek
8936721414 refac 2026-04-13 13:44:44 -05:00
Timothy Jaeryang Baek
d1a0fbe292 refac 2026-04-13 13:36:54 -05:00
Timothy Jaeryang Baek
22cfb3c673 refac 2026-04-13 13:26:13 -05:00
Timothy Jaeryang Baek
51765b619c refac 2026-04-13 13:13:45 -05:00
Timothy Jaeryang Baek
20544d412e chore: format 2026-04-12 22:11:10 -05:00
Timothy Jaeryang Baek
cb6e77be3e refac 2026-04-12 22:10:43 -05:00
Timothy Jaeryang Baek
d4b90f93bd refac 2026-04-12 22:08:27 -05:00
Timothy Jaeryang Baek
26b8ca5b5e refac 2026-04-12 19:41:02 -05:00
Timothy Jaeryang Baek
57784706e4 refac 2026-04-12 19:34:45 -05:00
Timothy Jaeryang Baek
fc98000aa8 refac
Some checks are pending
Create and publish Docker images with specific build args / merge-main-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-cuda-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / build-main-image (linux/amd64, ubuntu-latest) (push) Waiting to run
Create and publish Docker images with specific build args / build-main-image (linux/arm64, ubuntu-24.04-arm) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/amd64, ubuntu-latest) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/arm64, ubuntu-24.04-arm) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda126-image (linux/amd64, ubuntu-latest) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda126-image (linux/arm64, ubuntu-24.04-arm) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/amd64, ubuntu-latest) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/arm64, ubuntu-24.04-arm) (push) Waiting to run
Create and publish Docker images with specific build args / build-slim-image (linux/amd64, ubuntu-latest) (push) Waiting to run
Create and publish Docker images with specific build args / build-slim-image (linux/arm64, ubuntu-24.04-arm) (push) Waiting to run
Create and publish Docker images with specific build args / merge-cuda126-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-ollama-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-slim-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / copy-to-dockerhub (, main) (push) Blocked by required conditions
Create and publish Docker images with specific build args / copy-to-dockerhub (-cuda, cuda) (push) Blocked by required conditions
Create and publish Docker images with specific build args / copy-to-dockerhub (-cuda126, cuda126) (push) Blocked by required conditions
Create and publish Docker images with specific build args / copy-to-dockerhub (-ollama, ollama) (push) Blocked by required conditions
Create and publish Docker images with specific build args / copy-to-dockerhub (-slim, slim) (push) Blocked by required conditions
Python CI / Format Backend (push) Waiting to run
Frontend Build / Format & Build Frontend (push) Waiting to run
Frontend Build / Frontend Unit Tests (push) Waiting to run
2026-04-12 19:15:54 -05:00
Timothy Jaeryang Baek
21cc828132 refac 2026-04-12 19:13:13 -05:00
Timothy Jaeryang Baek
8172c7e3d5 refac 2026-04-12 19:08:30 -05:00
Timothy Jaeryang Baek
498ff8cdc3 refac 2026-04-12 19:05:25 -05:00
Timothy Jaeryang Baek
e10a00132e refac 2026-04-12 19:02:57 -05:00
Timothy Jaeryang Baek
facb194a07 refac 2026-04-12 19:02:51 -05:00
Timothy Jaeryang Baek
c3c8c605d7 refac 2026-04-12 18:56:04 -05:00
Timothy Jaeryang Baek
3c2c611ba9 refac 2026-04-12 18:49:34 -05:00
Timothy Jaeryang Baek
a359262616 refac 2026-04-12 18:48:06 -05:00