1152 Commits

Author SHA1 Message Date
Timothy Jaeryang Baek
d33ad462aa refac 2026-02-13 17:38:57 -06:00
Timothy Jaeryang Baek
b36f8d9314 chore: format 2026-02-13 15:00:47 -06:00
Timothy Jaeryang Baek
626d236d13 chore: format 2026-02-13 15:00:39 -06:00
Timothy Jaeryang Baek
79ecbfc757 refac 2026-02-13 14:59:20 -06:00
Timothy Jaeryang Baek
abc9b63093 refac
Co-Authored-By: Juan Calderon-Perez <835733+gaby@users.noreply.github.com>
2026-02-13 14:55:13 -06:00
Timothy Jaeryang Baek
f027a01ab2 fix: direct model access control 2026-02-13 14:39:01 -06:00
Timothy Jaeryang Baek
d1d1efe212 refac: scim 2026-02-13 14:27:11 -06:00
Timothy Jaeryang Baek
b7549d2f6c refac: defer profile 2026-02-13 14:08:07 -06:00
Timothy Jaeryang Baek
589c4e64c1 refac 2026-02-13 13:56:29 -06:00
Timothy Jaeryang Baek
20de5a87da refac 2026-02-13 13:43:43 -06:00
Timothy Jaeryang Baek
ca6b18ab5c refac: is_user_active 2026-02-13 13:40:59 -06:00
Timothy Jaeryang Baek
df6e38039f refac 2026-02-13 13:29:22 -06:00
Classic298
73776d54b8 fix: enforce public sharing permission checks across all resource types (#21358)
The sharePublic prop in editor components (Knowledge, Tools, Skills,
Prompts, Models) incorrectly included an "|| edit" / "|| write_access"
condition, allowing users with write access to see and use the "Public"
sharing option regardless of their actual public sharing permission.
Additionally, all backend access/update endpoints only verified write
authorization but did not check the corresponding sharing.public_*
permission, allowing direct API calls to bypass frontend restrictions
entirely.
Frontend: removed the edit/write_access bypass from sharePublic in all
five editor components so visibility is gated solely by the user's
sharing.public_* permission or admin role.
Backend: added has_public_read_access_grant checks to the access/update
endpoints in knowledge.py, tools.py, prompts.py, skills.py, models.py,
and notes.py. Public grants are silently stripped when the user lacks
the corresponding permission.
Fixes #21356
2026-02-13 11:22:32 -06:00
Timothy Jaeryang Baek
59afbd6f92 refac 2026-02-12 17:35:22 -06:00
Timothy Jaeryang Baek
8919d8a82a refac 2026-02-12 15:52:50 -06:00
Classic298
ea4ef28da5 init (#20883)
Co-authored-by: Tim Baek <tim@openwebui.com>
2026-02-12 15:50:13 -06:00
Timothy Jaeryang Baek
c653e4ec54 refac 2026-02-12 15:25:24 -06:00
Classic298
8cf32ae2a7 fix: prevent worker death during document upload by using run_coroutine_threadsafe (#21158)
* fix: prevent worker death during document upload by using run_coroutine_threadsafe

Replace asyncio.run() with asyncio.run_coroutine_threadsafe() in
save_docs_to_vector_db() to prevent uvicorn worker health check failures.

The issue: asyncio.run() creates a new event loop and blocks the thread
completely, preventing the worker from responding to health checks during
long-running embedding operations (>5 seconds default timeout).

The fix: Schedule the async embedding work on the main event loop using
run_coroutine_threadsafe(). This keeps the main loop responsive to health
check pings while the sync caller waits for the result.

Changes:
- main.py: Store main event loop reference in app.state.main_loop at startup
- retrieval.py: Use run_coroutine_threadsafe() instead of asyncio.run()

https://claude.ai/code/session_01UQSYvSTkXb57sFb7M85Kcw

* add env var

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-12 15:22:57 -06:00
Timothy Jaeryang Baek
531ac70ce5 refac 2026-02-12 12:07:45 -06:00
Timothy Jaeryang Baek
423d8b1817 refac 2026-02-12 11:04:34 -06:00
Timothy Jaeryang Baek
05ae44b98d refac 2026-02-12 11:01:46 -06:00
Timothy Jaeryang Baek
a40808579f refac 2026-02-12 10:59:41 -06:00
Timothy Jaeryang Baek
ccb71a7322 refac 2026-02-11 18:32:14 -06:00
Classic298
efe5416f83 fix: reduce TTFT by caching model lookups in chat completion (#20886)
fix: reduce TTFT by caching model lookups in chat completion

Skip expensive get_all_models() calls when models are already cached
in app.state. This significantly reduces Time To First Token (TTFT)
for chat completions and embeddings requests.

Previously, every request called get_all_models() which fetches model
lists from all configured backends. Now we check the cache first and
only call get_all_models() on cache miss.

Affected endpoints:
- openai: generate_chat_completion, embeddings
- ollama: embed, embeddings

Fixes #20069

Co-authored-by: Michael <42099345+mickeytheseal@users.noreply.github.com>
2026-02-11 18:29:10 -06:00
Timothy Jaeryang Baek
a4281f6a7f refac: ldap 2026-02-11 18:25:37 -06:00
Timothy Jaeryang Baek
2372b70031 refac: async pipelines requests 2026-02-11 18:24:30 -06:00
Timothy Jaeryang Baek
dddac2b0ca refac
Co-Authored-By: Classic298 <27028174+Classic298@users.noreply.github.com>
2026-02-11 18:19:01 -06:00
Timothy Jaeryang Baek
0da57149ae refac
Co-Authored-By: Classic298 <27028174+Classic298@users.noreply.github.com>
2026-02-11 18:13:30 -06:00
Thomas Rehn
ce3a615442 perf: cache OpenAI config reads to avoid redundant Redis lookups in /api/models (#21306)
Each access to request.app.state.config.<KEY> triggers a synchronous
Redis GET. In get_all_models_responses() and get_merged_models(), the
config keys OPENAI_API_BASE_URLS, OPENAI_API_KEYS, and
OPENAI_API_CONFIGS were read on every loop iteration — resulting
in some cases in 200-300 Redis round-trips for OPENAI_API_BASE_URLS alone.

Read each config value once into a local variable at the start of the
function and reuse it throughout.
2026-02-11 17:59:50 -06:00
Timothy Jaeryang Baek
4e0cb88583 refac: audio timeout
Co-Authored-By: Jannik S. <jannik@streidl.dev>
2026-02-11 17:56:49 -06:00
Timothy Jaeryang Baek
9b30e8f689 refac 2026-02-11 17:53:01 -06:00
Timothy Jaeryang Baek
f376d4f378 chore: format 2026-02-11 16:24:11 -06:00
Timothy Jaeryang Baek
e5035ea31e refac 2026-02-11 15:55:23 -06:00
Timothy Jaeryang Baek
c8cbdc8f7f refac 2026-02-11 15:24:12 -06:00
Timothy Jaeryang Baek
64c37ab968 refac 2026-02-11 15:12:37 -06:00
Timothy Jaeryang Baek
a38ad8fc42 refac 2026-02-11 14:09:55 -06:00
Timothy Jaeryang Baek
c2207887b3 feat: skills backend 2026-02-11 14:00:34 -06:00
Timothy Jaeryang Baek
3e56261c5e refac 2026-02-11 02:06:43 -06:00
Timothy Jaeryang Baek
30f72672fa refac 2026-02-10 15:57:08 -06:00
Timothy Jaeryang Baek
4aedfdc547 refac 2026-02-10 15:47:21 -06:00
Timothy Jaeryang Baek
e3a8257690 refac 2026-02-10 15:41:11 -06:00
Timothy Jaeryang Baek
c259c87806 refac 2026-02-10 15:30:16 -06:00
Classic298
f236192fe1 fix: resolve N+1 query in knowledge batch file add (#21006) 2026-02-09 16:17:30 -06:00
Timothy Jaeryang Baek
c2f5cb542e refac 2026-02-09 14:03:35 -06:00
Tim Baek
48a0abb40f Merge pull request #21277 from open-webui/acl
refac: acl
2026-02-09 13:34:36 -06:00
Timothy Jaeryang Baek
f7406ff576 refac 2026-02-09 13:28:14 -06:00
Tim Baek
e2d09ac361 refac 2026-02-09 09:06:48 +04:00
Tim Baek
4852227158 refac 2026-02-08 06:22:56 +04:00
Classic298
494cf8b3ef fix (#21226) 2026-02-08 03:19:26 +04:00
Tim Baek
258454276e fix: files settings save issue 2026-02-06 22:33:49 +04:00