Claude
498a04dc6c
feat(plugins): cross-worker tool + function cache invalidation via Redis
...
Bug: request.app.state.TOOLS / FUNCTIONS are per-worker Python dicts.
Save on worker A does not touch worker B's cache, so worker B keeps
serving the stale compiled module until the process restarts.
utils/tools.py's invocation path was also completely cache-blind —
a bare dict.get with no content-hash fallback, so even same-worker
edits skipped the TOOL_CONTENTS check and served the first-seen
module forever.
Symptom: editing a tool in the Workspace UI, triggering a chat, and
watching the OLD code execute until backend restart. Confirmed on a
multi-worker deployment (UVICORN_WORKERS > 1) with Redis.
Fix — three parts:
1. backend/open_webui/utils/plugin_cache.py (new)
* publish_invalidation(app, kind, id)
- drops the local TOOLS/FUNCTIONS + _CONTENTS entry
- publishes {kind, id} on REDIS_PLUGIN_CACHE_CHANNEL
* plugin_cache_listener(app)
- subscribes on startup, drops caches on every inbound message
- mirrors the existing redis_task_command_listener pattern
* falls back to pure local invalidation when Redis is unconfigured
2. utils/tools.py
* invocation path swapped from `TOOLS.get(tool_id)` to
`await get_tool_module_from_cache(request, tool_id)`, which does
content-hash invalidation from DB. Covers edits that predate or
race the Redis pub/sub message.
3. routers/tools.py + routers/functions.py
* create / update / delete / toggle / toggle_global all call
publish_invalidation after the DB mutation commits.
* toggle_function_by_id + toggle_global_by_id gained a `request`
parameter they were missing.
main.py lifespan starts the listener alongside the task listener and
cancels it on shutdown. No new env vars — reuses REDIS_URL and
REDIS_KEY_PREFIX.
Single-worker deployments still work: publish_invalidation
unconditionally drops the local cache before trying to publish.
2026-04-20 14:24:33 +00:00
Timothy Jaeryang Baek
b645b0dc23
refac
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 / 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-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-20 18:47:53 +09:00
Tim Baek
51627555bf
refac
2026-04-20 03:35:17 -04:00
Timothy Jaeryang Baek
1824e69a70
refac
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 / 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-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-20 09:33:10 +09:00
Timothy Jaeryang Baek
5127354b3e
refac
2026-04-20 09:21:30 +09:00
Timothy Jaeryang Baek
dc6df52a91
refac
2026-04-20 09:11:38 +09:00
Timothy Jaeryang Baek
f246a66810
refac
2026-04-20 09:10:48 +09:00
Timothy Jaeryang Baek
c3c857a3ec
refac
...
Co-Authored-By: twheel <100867139+whatisdata@users.noreply.github.com>
2026-04-20 08:59:30 +09:00
Timothy Jaeryang Baek
47329b5032
refac
2026-04-20 08:55:34 +09:00
Timothy Jaeryang Baek
d5e69f182c
refac
2026-04-20 08:53:06 +09:00
Timothy Jaeryang Baek
e29d145a1c
refac
2026-04-20 08:48:35 +09:00
Classic298
b3ca943da1
perf(channels): batch user lookup in model_response_handler thread history ( #23795 )
...
* perf(channels): batch user lookup in model_response_handler thread history
The thread-history builder in model_response_handler called
Users.get_user_by_id once per thread message (deduped via an intra-loop
dict), producing N individual SELECTs for a thread of N unique authors.
Replace with a single Users.get_users_by_user_ids call that returns all
authors in one WHERE id IN (...) query, matching the batch pattern
already used elsewhere in this file (lines 739, 804, 1320).
Behavior is preserved: deleted users still resolve to None and fall
through to the existing 'Unknown' fallback via .get().
* refac(channels): rename loop vars to full words per review
Address reviewer feedback to use descriptive names `message` and `user`
instead of single-letter `m` and `u` in the batch user-lookup
comprehensions.
---------
Co-authored-by: Claude <noreply@anthropic.com>
2026-04-20 08:37:07 +09:00
Timothy Jaeryang Baek
56c5bc1d34
refac
2026-04-20 08:36:24 +09:00
Timothy Jaeryang Baek
fd25152076
refac
2026-04-20 08:34:15 +09:00
Algorithm5838
51cd43229c
perf: extend fast-deep-equal to remaining call sites ( #23845 )
2026-04-20 08:26:30 +09:00
joaoback
0d10b946f5
Merge pull request #23858 from joaoback/patch-36
...
i18n: add pt-BR translations for newly added UI items and consistency…
2026-04-20 08:15:54 +09:00
Timothy Jaeryang Baek
28963815d1
refac
2026-04-20 00:16:45 +09:00
Timothy Jaeryang Baek
3e3f138d93
refac
2026-04-20 00:14:53 +09:00
Timothy Jaeryang Baek
4e31fa4427
refac
2026-04-20 00:12:53 +09:00
Timothy Jaeryang Baek
24dd5b461e
refac
2026-04-20 00:09:24 +09:00
Timothy Jaeryang Baek
1d501cfa3f
refac
2026-04-20 00:07:34 +09:00
Timothy Jaeryang Baek
f6d1969067
refac
2026-04-19 23:55:17 +09:00
Timothy Jaeryang Baek
eb16ae92a5
chore: format
2026-04-19 23:49:45 +09:00
Timothy Jaeryang Baek
73e28c9393
refac
2026-04-19 23:49:23 +09:00
Timothy Jaeryang Baek
4198f36c01
refac
2026-04-19 23:46:32 +09:00
Timothy Jaeryang Baek
ec9c066961
chore: format
2026-04-19 23:42:38 +09:00
Timothy Jaeryang Baek
a05a769938
refac
2026-04-19 23:42:09 +09:00
Timothy Jaeryang Baek
e5b5a17426
refac
2026-04-19 23:38:58 +09:00
Timothy Jaeryang Baek
29ee53aaa5
refac
2026-04-19 23:17:25 +09:00
Timothy Jaeryang Baek
60f3ba6b59
refac
2026-04-19 23:15:15 +09:00
Timothy Jaeryang Baek
b7b7b64d31
refac
2026-04-19 22:50:08 +09:00
Timothy Jaeryang Baek
37eba1c5a6
chore: format
2026-04-19 22:45:54 +09:00
Timothy Jaeryang Baek
8c9f267ad2
refac
2026-04-19 22:40:59 +09:00
Timothy Jaeryang Baek
5afc258c5b
refac
2026-04-19 22:37:10 +09:00
Timothy Jaeryang Baek
42694c7c0c
refac
2026-04-19 22:33:32 +09:00
Tim Baek
98c4f264e4
feat: calendar ( #23880 )
...
* feat: calendar
* refac
* refac
* refac
* refac
2026-04-19 22:22:51 +09:00
Timothy Jaeryang Baek
f45d0f130e
refac
2026-04-19 22:22:15 +09:00
Timothy Jaeryang Baek
98627e42b4
refac
2026-04-19 22:13:47 +09:00
Timothy Jaeryang Baek
f0ec5ee08f
refac
2026-04-19 21:49:48 +09:00
Timothy Jaeryang Baek
4a5401b417
refac
2026-04-19 21:48:27 +09:00
Timothy Jaeryang Baek
8d739e2aba
feat: calendar
2026-04-19 19:15:05 +09:00
Timothy Jaeryang Baek
5087492e25
refac
2026-04-19 15:49:42 +09:00
Timothy Jaeryang Baek
a4d62253df
refac
Frontend Build / Format & Build Frontend (push) Has been cancelled
Frontend Build / Frontend Unit Tests (push) Has been cancelled
Create and publish Docker images with specific build args / build-main-image (linux/amd64, ubuntu-latest) (push) Has been cancelled
Create and publish Docker images with specific build args / build-main-image (linux/arm64, ubuntu-24.04-arm) (push) Has been cancelled
Create and publish Docker images with specific build args / build-cuda-image (linux/amd64, ubuntu-latest) (push) Has been cancelled
Create and publish Docker images with specific build args / build-cuda-image (linux/arm64, ubuntu-24.04-arm) (push) Has been cancelled
Create and publish Docker images with specific build args / build-cuda126-image (linux/amd64, ubuntu-latest) (push) Has been cancelled
Create and publish Docker images with specific build args / build-cuda126-image (linux/arm64, ubuntu-24.04-arm) (push) Has been cancelled
Create and publish Docker images with specific build args / build-ollama-image (linux/amd64, ubuntu-latest) (push) Has been cancelled
Create and publish Docker images with specific build args / build-ollama-image (linux/arm64, ubuntu-24.04-arm) (push) Has been cancelled
Create and publish Docker images with specific build args / build-slim-image (linux/amd64, ubuntu-latest) (push) Has been cancelled
Create and publish Docker images with specific build args / build-slim-image (linux/arm64, ubuntu-24.04-arm) (push) Has been cancelled
Python CI / Format Backend (push) Has been cancelled
Create and publish Docker images with specific build args / merge-main-images (push) Has been cancelled
Create and publish Docker images with specific build args / merge-cuda-images (push) Has been cancelled
Create and publish Docker images with specific build args / merge-cuda126-images (push) Has been cancelled
Create and publish Docker images with specific build args / merge-ollama-images (push) Has been cancelled
Create and publish Docker images with specific build args / merge-slim-images (push) Has been cancelled
Create and publish Docker images with specific build args / copy-to-dockerhub (, main) (push) Has been cancelled
Create and publish Docker images with specific build args / copy-to-dockerhub (-cuda, cuda) (push) Has been cancelled
Create and publish Docker images with specific build args / copy-to-dockerhub (-cuda126, cuda126) (push) Has been cancelled
Create and publish Docker images with specific build args / copy-to-dockerhub (-ollama, ollama) (push) Has been cancelled
Create and publish Docker images with specific build args / copy-to-dockerhub (-slim, slim) (push) Has been cancelled
2026-04-18 06:23:50 +09:00
Timothy Jaeryang Baek
7cfb260b8a
refac
2026-04-17 15:01:42 +09:00
Timothy Jaeryang Baek
49430de42d
refac
2026-04-17 15:00:17 +09:00
Timothy Jaeryang Baek
1be9627dd2
refac
2026-04-17 14:57:49 +09:00
Classic298
f0e0cfcf02
perf: avoid redundant knowledge re-fetch in update_knowledge_access_by_id ( #23799 )
...
After set_access_grants, the handler was reloading the same knowledge
record via get_knowledge_by_id, which triggers an extra SELECT plus a
nested fetch of access grants. set_access_grants already returns the
newly-written grants and the local knowledge object is otherwise
unchanged, so update it in place and reuse it for the response.
https://claude.ai/code/session_01S18Lgqbih7Ry2JZUUv8TxF
Co-authored-by: Claude <noreply@anthropic.com>
2026-04-17 14:44:42 +09:00
Timothy Jaeryang Baek
55bfc7cbc2
refac
2026-04-17 14:35:13 +09:00
Timothy Jaeryang Baek
4113b15a60
chore: format
2026-04-17 14:28:18 +09:00
Timothy Jaeryang Baek
e8e655d0de
chore: dep bump
2026-04-17 14:24:34 +09:00