Files
open-webui/backend/open_webui/utils
Classic298 646a568ae6 fix: enforce global web search and image generation switches on the legacy function-calling path (#27669)
The legacy function-calling path acted on the client-supplied `features` dict after checking only the per-user permission, so a user who still held `features.web_search` or `features.image_generation` could keep triggering web searches and image generation after an administrator had switched those off instance-wide. The native function-calling path already gates the equivalent builtin tools on `web.search.enable` and `image_generation.enable` in `get_builtin_tools`, so the two paths disagreed and the admin-level switch did not actually stop the outbound provider calls it was turned off to stop.

Gate the legacy web search handler on `web.search.enable` at its call site, and gate `chat_image_generation_handler` on the two image switches internally. The image handler needs the check inside it because `image_generation.enable` and `images.edit.enable` are independent: editing stays available when generation is disabled, matching the `/images/generations` and `/images/edit` routes and the native `generate_image`/`edit_image` tools. The handler calls `image_generations`/`image_edits` directly and so bypasses the route guards, which is why the check has to live at the caller.

The "Creating image" status event moves below the new guard so a disabled configuration returns without leaving an unresolved progress indicator in the chat.
2026-08-17 02:15:05 -06:00
..
2026-06-29 11:56:00 -05:00
2026-07-31 17:41:14 -04:00
2026-08-13 21:02:17 -06:00
2026-08-10 22:36:42 -06:00
2026-08-13 16:42:10 -06:00
2026-07-31 17:30:47 -04:00
2026-03-17 17:58:01 -05:00
2026-07-23 02:54:56 -04:00
2026-07-26 21:12:14 -04:00
2026-07-31 17:41:14 -04:00
2026-07-31 17:41:14 -04:00
2026-08-17 00:57:57 -07:00
2026-07-23 21:29:33 -04:00
2026-07-27 00:12:47 -04:00
2026-08-10 19:28:21 -06:00
2026-07-26 23:09:22 -04:00
2026-08-13 00:07:31 -06:00
2026-07-27 19:39:36 -04:00
2026-08-17 00:43:47 -07:00
2026-08-16 22:56:19 -07:00
2026-08-17 00:57:57 -07:00
2026-03-17 17:58:01 -05:00
2026-07-27 04:17:00 -04:00
2026-08-10 20:13:03 -06:00
2026-06-19 00:16:06 +02:00
2026-08-08 15:47:10 -06:00
2026-08-16 22:52:24 -07:00
2026-08-17 00:35:12 -07:00
2026-07-27 19:39:36 -04:00
2026-07-31 17:41:14 -04:00