Every sent message, finished reply, regenerate, edit and saved follow-up rewrote the whole stored conversation, so long chats got slower with each turn, most of all on PostgreSQL. Messages now live only in the message table the app already keeps, and a change writes only the messages it touches. Chats open, share, export and import as before. API responses no longer carry the flat message list older clients saved next to the conversation, and the answers to pinning, archiving, sharing or moving a chat no longer repeat its messages. Existing chats are converted once during the upgrade, in batches that continue where they stopped if the upgrade is interrupted.
| 130 MB chat, instant test model | SQLite before | SQLite after | PostgreSQL before | PostgreSQL after |
| --- | --- | --- | --- | --- |
| Message accepted | 2.4 s | 0.20 s | 10.9 s | 0.32 s |
| Reply done | 4.9 s | 0.9 s | 22.5 s | 1.4 s |
| Regenerate done | 4.6 s | 0.9 s | 19.6 s | 1.4 s |
| Saving an edit | 3.7 s | 1.8 s | 5.8 s | 1.7 s |
| Opening the chat | 2.3 s | 0.9 s | 1.6 s | 1.2 s |
| Written to the database per message | 533 MB | 2 KB | 533 MB | 2 KB |
Fixes#34688
A message sent while the previous reply was still running was answered without the files attached earlier in the chat. With Preload files on, the model never got the file's text and the answer showed no citation. With it off, the model was not offered the tools to read the attachments. Answering it also replaced the chat's file list with that message's own files, usually none, so after a reload later messages lost the earlier files too. Such a message now gets the same attachments as a normal follow-up: the chat's files on that branch, minus any the user removed in the meantime, plus its own.
Fixes#34933
Members of a group with default models had every page load wait for all model providers to answer before the page was drawn. With an unreachable provider they saw the splash screen for about 11 seconds on each load. The default models are now checked against the model list the server already holds, so the page draws right away and the same default model is selected. The first page load after a server start or a change to the connection settings still waits on the providers once, until the model list has loaded again. A group default that a member can only reach through their own Tether connection no longer counts and they get the global default instead.
<table>
<tr><th>Group member, provider answering in 150 ms unless noted</th><th>before</th><th>after</th></tr>
<tr><td>first request of each page load</td><td>172 ms</td><td>11 ms</td></tr>
<tr><td>provider calls made by it</td><td>1</td><td>0</td></tr>
<tr><td>splash screen gone</td><td>864 ms</td><td>719 ms</td></tr>
<tr><td>splash screen gone, provider not answering</td><td>11.5 s</td><td>0.7 s</td></tr>
</table>
Fixes#34841
Signing in through an OIDC provider that signs the ID token with HS256 failed with "Algorithm 'HS256' requires 'oct' key", and the user landed back on the sign-in page with an error. OpenID Connect allows this signing method when the app has a client secret, and the key is that secret, which never appears among the provider's published keys. Open WebUI now checks these ID tokens against the client secret, so the sign-in goes through, while a token signed with any other secret is still refused. Providers that sign with their published keys are unchanged.
Fixes#34922
Opening a chat with no machine selected read through the whole conversation on every open, looking for a machine to restore. That is the normal case for a chat, so large chats opened about 45% slower. A chat that already saved its selection, with no machine or with a machine saved under its former terminal name, now opens without that extra pass. Agent chats with nothing saved still get their machine and folder back.
Fastest of seven opens of a 130 MB chat on SQLite:
<table>
<tr><th></th><th>Context Compaction off</th><th>Context Compaction on</th></tr>
<tr><td>dev before Terminals were renamed to Machines</td><td>0.316 s</td><td>0.429 s</td></tr>
<tr><td>dev</td><td>0.469 s</td><td>0.608 s</td></tr>
<tr><td>this fix</td><td>0.325 s</td><td>0.437 s</td></tr>
</table>
Fixes#34962
Saving a router model whose pattern is not a valid regular expression showed only "[object Object]" in the error toast, so the admin could not tell what was wrong. The toast now shows the server's message, such as "Value error, Invalid pattern: missing ), unterminated subpattern at position 0". Any other rule the server refuses when a router model is saved reads the same way.
Fixes#34897
A pattern like "```|def |function " (the example in the docs) lost its trailing space when the router model was saved, from the dialog or through the API. "function" without a space after it then matched as well, so a message about "functionality" went to the model meant for code. Patterns are now saved exactly as typed, and a pattern saved before this needs its space typed again. Conditions saved through the API now keep their spaces as sent too.
Fixes#34898
Providers and the proxies in front of them often write errors for people, with bold text, a list of things to try, a link to a status page or an id to quote, but the error box under a reply showed the Markdown marks as typed and the links as plain text. The error box now renders its message the way replies are rendered, so links open like links in replies, and single line breaks still show as line breaks, as they have since #34954. HTML and images in an error are shown as text and never rendered, and a plain one-line error looks exactly as before.
Fixes#34951
On a phone, a quick pinch in the image preview could shrink the image to nothing, a quick spread could throw it off screen and stop zooming, and after zooming in and back out slowly the image ended up smaller than it opened. The previews made every pinch three and a half times stronger than the fingers moved, so a quick pinch reached a size of zero that the image could not recover from, and all other pinches overshot. Pinch now follows the fingers at normal speed in the image, file, diagram and slide previews.
Fixes#34939
When a model connection answered with an error message spread over several lines, the error box under the reply ran all lines together into one paragraph. The box now keeps the message's line breaks, so each line shows on its own line, and long unbroken text still wraps inside the box. Spaces at the start or end of a line are still dropped, so the box shows no odd gaps.
Fixes#34950
On a phone or tablet, tapping Download in the full-screen image view did nothing, and the same went for the other buttons over a zoomable view, such as Download as SVG and Copy to clipboard on a diagram. The zoomable view under those buttons captured every touch, so a tap on a button never became a click. Taps on these buttons now reach them and no longer zoom or pan the view. The image view's buttons also sit on a dark bar now: on a zoomed light image their white icons were invisible, which left an iPhone user with no visible way to close the preview.
Fixes#34942