Commit graph

69 commits

Author SHA1 Message Date
Timothy Jaeryang Baek
8be4c5fa6a refac
Co-Authored-By: Classic298 <27028174+Classic298@users.noreply.github.com>
2026-08-25 14:35:22 -04:00
Timothy Jaeryang Baek
85c3d0ae2f refac 2026-08-13 00:07:31 -06:00
Classic298
e5b24a22d0
fix: model ID whitelists accepting duplicate entries (#28251)
Adding a model ID that was already on the list in the connection settings modal simply appended it again, so the same model could sit in the whitelist any number of times. The arena model modal had the same flaw, its dropdown kept offering models that were already selected.

The connection modal now rejects a duplicate with a toast and trims the input first; surrounding whitespace renders invisibly in the list, so an untrimmed ID would slip past the duplicate check and still show up as a visually identical row. The arena modal instead filters already-added models out of the dropdown, matching the existing model selector in the admin settings, so a duplicate can no longer be picked at all. Both modals also drop duplicates when loading a stored list, so configs that already contain them are cleaned on their next save.

Until such a config is re-saved, one residual effect of old data remains: a duplicated ID in an arena model's stored list keeps double weight in the random model draw. New duplicates can no longer be created through the UI.

Fixes #28249
2026-08-10 19:27:12 -06:00
G30
085d11eef2
chore: drop redundant background repaints so surfaces inherit their parent (#27576)
* chore: drop redundant background repaints so surfaces inherit their parent

Four spots repaint the exact color their parent surface already provides
(bg-white / dark:bg-gray-900 rows inside same-colored pages and modals,
and the selectClass dark repaint inside the connection modals — the
sibling input const is already fully transparent). Visually identical in
stock light and dark; removing them lets instance theming show through
instead of leaving opaque boxes:

- .tiptap tr (app.css) — table rows in notes/editors
- Edit User Group Users tab body rows (common Modal surface)
- AddToolServerModal + AddTerminalServerModal selectClass dark repaint

The matching repaints inside the ModelUsage/UserUsage components are
not part of this change — those files were dead code and were removed
entirely in #27574.

* chore: catch remaining redundant surface repaints missed in the first pass

Same rule as the previous commit — every one of these repaints the exact
color its parent surface already provides, so removal is stock-identical
in light and dark while letting instance theming show through:

- Analytics Dashboard's inline Model Usage / User Activity row markup
  (the Analytics tab renders these tables from Dashboard.svelte itself;
  the unreferenced ModelUsage/UserUsage component files were removed
  in #27574)
- Evaluations Feedbacks + Leaderboard body rows (settings modal surface)
- admin UserList body rows (app page surface)
- chat markdown tables (MarkdownTokens): thead and body rows — unlike
  the tiptap header (gray-850 contrast, untouched), this thead painted
  the page's own color
- CitationsModal source rows (common Modal surface)
- AddConnectionModal selectClass dark repaint — third copy of the same
  const already fixed in AddToolServerModal / AddTerminalServerModal
2026-07-27 00:44:51 -04:00
Timothy Jaeryang Baek
b81627b2c9 refac 2026-07-26 18:46:39 -04:00
Timothy Jaeryang Baek
bb12b1a18b refac 2026-07-23 04:16:14 -04:00
Timothy Jaeryang Baek
d3ea51fd46 refac 2026-07-20 00:23:01 -04:00
Timothy Jaeryang Baek
933ab1e1cd refac 2026-07-15 18:03:36 -04:00
Timothy Jaeryang Baek
ba067258de refac 2026-07-15 17:50:26 -04:00
Timothy Jaeryang Baek
db934a3b4f refac 2026-07-15 16:51:08 -04:00
Timothy Jaeryang Baek
9499587c33 refac 2026-07-15 04:25:51 -04:00
Timothy Jaeryang Baek
aedb6bef4e refac 2026-07-14 04:15:20 -04:00
Classic298
75df948f34
feat: forward client User-Agent to model backends via {{USER_AGENT}} placeholder (#26333)
Adds a {{USER_AGENT}} custom-header placeholder that relays the inbound
client's User-Agent to upstream model backends, so providers see the real
client instead of Open WebUI's internal aiohttp UA. This makes upstream
usage/cost attribution and backend telemetry possible, and is opt-in
per-connection (no global flag): admins add {{USER_AGENT}} to a connection's
custom headers in Admin > Settings > Connections.

The placeholder is sourced from the live inbound request (with a metadata
fallback for detached RAG/tool calls), so it resolves on every prompt-sending
path, not just chat completions:

- OpenAI completions, Responses API, and proxy — all route through
  get_headers_and_cookies, which now passes the request into get_custom_headers.
- Anthropic Messages API (/api/v1/messages) — already covered, it delegates
  to the chat completion handler.
- Ollama (/api/chat, /v1/completions, /v1/chat/completions, /v1/messages,
  /v1/responses) — previously had no custom-header support at all; send_request
  now applies per-connection custom headers (with templating) for every
  Ollama prompt endpoint.

Custom headers are applied after the built-in user-info headers so explicit
admin-configured headers take precedence. The other existing placeholders
({{CHAT_ID}}, {{USER_ID}}, ...) now also work on the newly covered paths.

Frontend: the connection editor's Headers field is now shown for Ollama
connections too (previously gated to non-Ollama), so the placeholder can be
configured there.

Ref: open-webui/open-webui#26159
2026-06-29 05:58:19 -05:00
Timothy Jaeryang Baek
eb4eebc3ce refac 2026-06-01 13:10:19 -07:00
Timothy Jaeryang Baek
c8f851bd2d refac
Co-Authored-By: Sergey Zinchenko <sergey.zinchenko.rnd@gmail.com>
2026-05-20 00:26:22 +04:00
Timothy Jaeryang Baek
bf4f44ee9c refac 2026-05-09 05:27:47 +09:00
Timothy Jaeryang Baek
4fe2de7864 refac 2026-05-09 01:13:16 +09:00
Timothy Jaeryang Baek
139e764b2f refac 2026-03-23 23:39:52 -05:00
Timothy Jaeryang Baek
157ff57c40 refac 2026-03-13 16:28:01 -05:00
Shirasawa
7d45459a47
fix: keep save button spinner inline (#22227) 2026-03-04 13:56:49 -06:00
G30
f95cff0895
fix(ui): replace static dropdown backgrounds with transparent mapping (#21728) 2026-02-22 14:23:34 -06:00
Timothy Jaeryang Baek
49c36238d0 refac 2026-02-18 13:54:59 -06:00
Timothy Jaeryang Baek
ea9c58ea80 feat: experimental responses api support 2026-02-01 19:39:28 -06:00
Matthew Kusz
17bfd38696
Fix dropdown backgrounds (#19693) 2025-12-02 15:16:36 -05:00
Timothy Jaeryang Baek
da42850eff enh: custom headers for external tool servers 2025-11-12 23:39:27 -05:00
Timothy Jaeryang Baek
19ba6c06dd refac/fix: verify connection 2025-10-07 22:56:52 -05:00
Timothy Jaeryang Baek
f25b7b73b4 refac: openai additional headers support 2025-10-03 00:23:26 -05:00
Timothy Jaeryang Baek
c01255570b chore: format 2025-09-17 11:11:46 -05:00
Timothy Jaeryang Baek
caf0a1fbb6 feat: Allow Azure OpenAI to authenticate using DefaultAzureCredential
Co-Authored-By: Selene Blok <20491756+selenecodes@users.noreply.github.com>
2025-09-17 11:04:47 -05:00
Timothy Jaeryang Baek
6f6412dd16 refac 2025-09-08 19:53:44 +04:00
Timothy Jaeryang Baek
2b2d123531 refac: oauth auth type in openai connection 2025-09-08 19:42:50 +04:00
Timothy Jaeryang Baek
474df5e534 refac 2025-09-08 19:18:55 +04:00
Timothy Jaeryang Baek
8a9f862701 refac 2025-09-08 19:07:00 +04:00
Timothy Jaeryang Baek
001dab0439 refac: wording 2025-09-08 18:55:57 +04:00
Timothy Jaeryang Baek
5bdd334b74 enh: azure openai toggle 2025-09-03 20:28:29 +04:00
silentoplayz
82ed9b0a97 i18n.t: updates 2025-08-13 20:15:16 -04:00
Timothy Jaeryang Baek
ffa8ad0a22 refac: azure url detection 2025-07-23 12:15:02 +04:00
Timothy Jaeryang Baek
c8e8111dd9 refac 2025-06-27 15:44:26 +04:00
Silentoplayz
d1e3940abd refac: Spinner and XMark components 2025-06-25 18:44:45 -04:00
Sine Jespersen
33a3aed698 remove repeated classes 2025-06-13 14:42:55 +02:00
Sine Jespersen
7d8fb116b6 Use <ul and <li because the items are a list 2025-06-13 14:10:29 +02:00
Sine Jespersen
a710ea1f07 add aria label to delete button 2025-06-13 14:10:29 +02:00
Sine Jespersen
b95bc727df add label for screen readers for model id input 2025-06-13 14:10:29 +02:00
Sine Jespersen
ba9e9e8095 add aria label to button with no label 2025-06-13 14:10:29 +02:00
Sine Jespersen
85018dd106 high contrast mode on placeholder 2025-06-13 14:10:29 +02:00
Sine Jespersen
669a9f0777 highContrastMode (for accessibility) on text color in add connection modal 2025-06-13 14:10:28 +02:00
Sine Jespersen
1160a03644 change label for url to label instead of div 2025-06-13 14:10:28 +02:00
Sine Jespersen
843810cc9f add aria hidden to decorative svg 2025-06-13 14:10:28 +02:00
Sine Jespersen
8b5f5bb327 add label to verify connection button 2025-06-13 14:10:28 +02:00
Sine Jespersen
15efb07961 add label to toggle connection button in configure connect modal 2025-06-13 14:10:28 +02:00