Commit graph

7615 commits

Author SHA1 Message Date
Classic298
aa1326eaea
fix: replies cut off at the token limit on a Responses API connection lose their token usage (#33619)
When a streamed reply from a Responses API connection stopped early, for example at the token limit or through a content filter, its token counts were lost. The chat showed no usage for that reply and the admin analytics recorded zero tokens for it. Such replies now keep the usage the provider reported, the same as replies that finished normally.

Fixes #33615
2026-11-03 21:04:51 +09:00
Classic298
fa09d74644
fix: notes over 2 MB open empty and cannot be edited (#33618)
A note over 2 MB, which one pasted screenshot can reach because images are embedded in the note, opened as an empty page and discarded what you typed. Live editing of notes had its own 2 MB limit, smaller than what the server accepts in one transfer, so it refused to load such notes. That limit now matches the server's 16 MB transfer limit, so any note the server can receive opens and saves again.

Fixes #33606
2026-11-03 20:59:19 +09:00
Timothy Jaeryang Baek
fe2219d6f9 refac 2026-11-03 20:55:06 +09:00
Classic298
dd6720c528
fix: non-ASCII stop sequences on a model reach the provider corrupted (#33614)
A Stop Sequence saved on a workspace model reached the provider corrupted when it had non-ASCII text in it (終 went out as çµ\x82, café as café), so the model never stopped on it. This happened when an API client used the model through /openai/chat/completions or /ollama/api/chat. Those stops now arrive unchanged, and typing \n in the field still sends a newline.

Fixes #33610
2026-11-03 20:44:05 +09:00
Classic298
1d5373066d
fix: OpenTelemetry request metrics create a new series for each distinct URL (#33613)
With OpenTelemetry metrics on, a request for a URL the server has no API endpoint for was counted under its full address, so every distinct URL became a metric series of its own and the series count kept growing. When the web interface is not served (API-only setups) this happens for any unknown URL, such as bots probing for missing paths. With Starlette 1.3.1, the version pinned for source installs, it also happens for every page load, static file and websocket request, because that version tells the server nothing about which part of the app answered them. These requests are now counted without a URL label, while API requests keep theirs. Admins need to do nothing, as the old series stop growing and age out.

Fixes #33576
2026-11-03 20:43:51 +09:00
Classic298
f3ef8b9491
fix: Sub-agents settings show blank and switched off when a limit is 0 (#33612)
Saving the Sub-agents admin tab could turn sub-agents off and clear their system prompt when one of the limits was still 0. Older releases accepted 0 there, also from the SUBAGENTS_MAX_* environment variables, but the tab now fails to load such a value and shows everything blank and switched off, so saving writes that blank state back. A limit of 0 now shows as empty, meaning no limit, which matches what sub-agents already do with a 0 while they run.

Fixes #33609
2026-11-03 20:28:38 +09:00
Timothy Jaeryang Baek
0c64e5d596 chore: format 2026-11-03 17:36:03 +09:00
Timothy Jaeryang Baek
a8b478ed7b refac 2026-11-03 17:17:59 +09:00
Timothy Jaeryang Baek
bab66b2c2f refac 2026-11-03 16:31:24 +09:00
Timothy Jaeryang Baek
e789513ea6 refac 2026-11-03 16:25:23 +09:00
Timothy Jaeryang Baek
f0cc1bb86e refac 2026-11-02 17:49:51 +09:00
Timothy Jaeryang Baek
2840f0e07b refac
Some checks are pending
Python CI / Ruff Format (3.11) (push) Waiting to run
Python CI / Ruff Format (3.12) (push) Waiting to run
Create and publish Docker images with specific build args / build (map[arch:linux/amd64 runner:ubuntu-latest], map[build_args: free_disk:false name:main suffix:]) (push) Waiting to run
Create and publish Docker images with specific build args / build (map[arch:linux/amd64 runner:ubuntu-latest], map[build_args:USE_CUDA=true USE_CUDA_VER=cu126 free_disk:true name:cuda126 suffix:-cuda126]) (push) Waiting to run
Create and publish Docker images with specific build args / build (map[arch:linux/amd64 runner:ubuntu-latest], map[build_args:USE_CUDA=true free_disk:true name:cuda suffix:-cuda]) (push) Waiting to run
Create and publish Docker images with specific build args / build (map[arch:linux/amd64 runner:ubuntu-latest], map[build_args:USE_OLLAMA=true free_disk:false name:ollama suffix:-ollama]) (push) Waiting to run
Create and publish Docker images with specific build args / build (map[arch:linux/amd64 runner:ubuntu-latest], map[build_args:USE_SLIM=true free_disk:false name:slim suffix:-slim]) (push) Waiting to run
Create and publish Docker images with specific build args / build (map[arch:linux/arm64 runner:ubuntu-24.04-arm], map[build_args: free_disk:false name:main suffix:]) (push) Waiting to run
Create and publish Docker images with specific build args / build (map[arch:linux/arm64 runner:ubuntu-24.04-arm], map[build_args:USE_CUDA=true USE_CUDA_VER=cu126 free_disk:true name:cuda126 suffix:-cuda126]) (push) Waiting to run
Create and publish Docker images with specific build args / build (map[arch:linux/arm64 runner:ubuntu-24.04-arm], map[build_args:USE_CUDA=true free_disk:true name:cuda suffix:-cuda]) (push) Waiting to run
Create and publish Docker images with specific build args / build (map[arch:linux/arm64 runner:ubuntu-24.04-arm], map[build_args:USE_OLLAMA=true free_disk:false name:ollama suffix:-ollama]) (push) Waiting to run
Create and publish Docker images with specific build args / build (map[arch:linux/arm64 runner:ubuntu-24.04-arm], map[build_args:USE_SLIM=true free_disk:false name:slim suffix:-slim]) (push) Waiting to run
Create and publish Docker images with specific build args / merge (map[name:cuda suffix:-cuda]) (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge (map[name:cuda126 suffix:-cuda126]) (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge (map[name:main suffix:]) (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge (map[name:ollama suffix:-ollama]) (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge (map[name:slim suffix:-slim]) (push) Blocked by required conditions
Create and publish Docker images with specific build args / notify-helm-charts (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 (-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
Frontend Build / Format & Build (push) Waiting to run
Create and publish Docker images with specific build args / copy-to-dockerhub (-cuda126, cuda126) (push) Blocked by required conditions
Frontend Build / Unit Tests (push) Waiting to run
2026-11-02 12:47:34 +09:00
Timothy Jaeryang Baek
ddb43c83ba refac 2026-11-02 12:45:15 +09:00
Timothy Jaeryang Baek
47a9e7d48d refac 2026-11-02 12:09:54 +09:00
Timothy Jaeryang Baek
789a0f402a refac 2026-11-02 11:37:00 +09:00
Timothy Jaeryang Baek
6dd3cc216f refac 2026-11-02 10:54:47 +09:00
Timothy Jaeryang Baek
151f7a84d1 refac 2026-11-02 10:09:34 +09:00
Timothy Jaeryang Baek
b659b534d4 refac 2026-11-02 09:59:00 +09:00
Timothy Jaeryang Baek
321701c1af refac 2026-11-02 09:52:30 +09:00
Timothy Jaeryang Baek
d99ec1c02c refac 2026-11-02 08:48:51 +09:00
Timothy Jaeryang Baek
3bd0cdd0f3 refac 2026-11-02 01:16:43 +09:00
Timothy Jaeryang Baek
b51e68fbb3 refac 2026-11-02 00:31:46 +09:00
Timothy Jaeryang Baek
70c5e38fc7 refac 2026-11-01 23:26:19 +09:00
Timothy Jaeryang Baek
c4c10aa255 refac 2026-11-01 23:10:27 +09:00
Timothy Jaeryang Baek
a06aa230f7 refac 2026-11-01 21:30:24 +09:00
Timothy Jaeryang Baek
e5a2e6438e refac 2026-11-01 19:33:45 +09:00
Timothy Jaeryang Baek
91241306e2 refac 2026-11-01 09:52:12 +09:00
Classic298
b4b6cc936d
refac: run the knowledge read check on every pending files poll (#33461)
The pending knowledge files stream now checks the user's current account and read access again on every poll.
2026-11-01 09:18:15 +09:00
Classic298
4adf3083f3
refac: identify loader archives by content (#33460)
* fix: apply the document archive size guard to every zip file, not just named extensions

The decompression-bomb guard in the document loader only ran when the
filename extension or the declared content type matched a fixed list, so
an office archive renamed to a legacy or unknown extension (for example
an .xlsx saved as .xls, .bin, or served from a URL with no extension)
skipped the check entirely and was fully inflated in the worker. The
guard now detects zip archives by content and checks every one of them,
while non-archive files keep the previous behavior.

* refac: identify loader archives by content

The document loader now recognises archives by their content when checking their size.
2026-11-01 09:06:46 +09:00
Timothy Jaeryang Baek
3814b7b2f1 refac 2026-10-31 16:50:01 +09:00
Classic298
c9ee89467e
feat: {{USER_ROLE}} prompt variable for the signed-in user's role (#33441)
Prompts could use the user's name and email but not their role, so role-aware system prompts needed a custom Filter function. Model system prompts, the user's own system prompt, saved prompts used with a slash command and chat requests through the API now replace {{USER_ROLE}} with the role, such as admin or user. Requested in #4765.
2026-10-31 07:47:17 +09:00
Timothy Jaeryang Baek
91e8deee74 refac 2026-10-30 16:43:24 +09:00
Timothy Jaeryang Baek
9d1b4ef362 refac 2026-10-30 16:01:47 +09:00
Timothy Jaeryang Baek
0e0ba872a4 refac 2026-10-30 07:50:55 +09:00
Timothy Jaeryang Baek
5c4fb61d86 refac 2026-10-30 07:15:50 +09:00
Timothy Jaeryang Baek
7618df3f53 refac 2026-10-30 07:08:28 +09:00
Classic298
9f33c966c9
feat: raise the default tool-call iteration limit per response to 1024 (#33384)
With native function calling, each model turn that calls tools counts as one iteration, and a single response was stopped with "Tool-call limit reached (256 iterations)." after 256 of them. The CHAT_RESPONSE_MAX_TOOL_CALL_ITERATIONS environment variable now defaults to 1024, also when it is set empty or to something that is not a number, and the error shows the new number. A model stuck calling tools in a loop now runs up to 1024 iterations before it is stopped; setting the variable to 256 keeps the old limit, and -1 still means no limit.
2026-10-30 04:51:10 +09:00
Timothy Jaeryang Baek
5546e3c655 refac 2026-10-29 18:00:54 +09:00
Timothy Jaeryang Baek
858c1e9665 chore: bump 2026-10-29 17:47:24 +09:00
Timothy Jaeryang Baek
44a9d499db refac 2026-10-29 17:39:31 +09:00
Timothy Jaeryang Baek
df61370456 refac 2026-10-29 17:20:55 +09:00
G30
722f71f2cc
fix: the Available Tools window lists an OpenAPI tool server's tools (#33205) 2026-10-29 17:02:14 +09:00
Classic298
a59cab0aa9
perf: knowledge base changes slow down as the knowledge base grows (#33335)
Adding, updating or removing knowledge base files through the API sent back the metadata of every file in the knowledge base, and so did renaming a knowledge base or changing its access. These calls got slower as the knowledge base grew, so bulk ingestion through the API lost speed with every batch. Adding or updating files now returns only those files, while removing a file, renaming or changing access returns an empty files list. API clients that read the files list from these responses now get only the affected files; the full list stays available, paginated, from `GET /api/v1/knowledge/{id}/files`. Timings with a local mock embedding server that answers instantly, median of 5 runs (at 1,000 files the per-file work of a batch still hides the difference):

| Files already in the knowledge base | Call | Before | After | Response size before | Response size after |
|---|---|---|---|---|---|
| 1,000 | batch add of 100 files | 519 ms | 528 ms | 437 KB | 39 KB |
| 10,000 | batch add of 100 files | 679 ms | 476 ms | 4.0 MB | 39 KB |
| 10,000 | single file add | 184 ms | 36 ms | 4.0 MB | 0.6 KB |

Closes #31397
2026-10-29 17:00:29 +09:00
Timothy Jaeryang Baek
ef29fb12f1 refac 2026-10-29 16:44:26 +09:00
Timothy Jaeryang Baek
f2cdbbebe3 refac 2026-10-29 16:39:42 +09:00
Classic298
63ca4237eb
feat: keep tool images away from models with Vision turned off (#33345)
When a tool returned an image, for example Open Terminal reading a PNG, a native tool or an MCP screenshot tool, the image was sent to the model even when the model has Vision turned off. A provider serving a text-only model rejects that request, so the reply failed with an error like "At most 0 image(s) may be provided in one prompt", and every later message in the chat failed the same way. With Vision off the model now gets a short "[image]" note in place of each tool image, including images already saved in the chat, so stuck chats work again. The images stay saved, so they reach the model again once Vision is turned on.

Fixes #32720
2026-10-29 16:24:47 +09:00
G30
893dbc9bd8
fix: a cleared Embedding Batch Size no longer breaks file processing (#33288) 2026-10-29 08:53:19 +09:00
Classic298
226dca18cd
fix: member's chat loses its pin when the shared folder owner moves it (#33342)
When the owner of a shared folder moved a chat a member created to another folder inside the shared folder, the chat lost the member's pin and dropped out of their Pinned list. The owner's move now keeps the member's pin, just as it already keeps the chat's unread status for them. Moving your own chat into a folder still unpins it, as before, so it shows up in that folder.

Fixes #33341
2026-10-29 08:05:16 +09:00
Timothy Jaeryang Baek
fdaa240d44 refac 2026-10-29 06:49:47 +09:00
Timothy Jaeryang Baek
360d81dfe8 refac 2026-10-29 06:32:47 +09:00