Files
open-webui/backend/open_webui
Classic298 60ded561a9 fix: load models before resolving automation model defaults (#30379)
Automations lost their model's tool bindings (including MCP servers), default features such as web search, default filters and terminal on the first run after a restart. The model then answered that it had no tools. Later runs and a manual Regenerate worked. Automations on the base models cache were not affected.

The run read the model from app.state.MODELS before anything had loaded it. After a restart or a connection settings save, that cache stays empty until a browser loads the model list or a chat completion runs. The completion runs only after the automation has already built its request.

execute_automation now loads the models when the cache is empty, using the same guard chat_completion uses, before either the chat or the channel target reads it. This also fixes channel automations showing the raw model ID in place of the model name on a cold cache.

Verified end to end on a restarted instance with a mock upstream: before, both chat and channel runs reached the pipeline without tool_ids or features. After, both carry the model's tools and web search, and the upstream receives the tool.

Fixes #27694
2026-09-23 23:51:29 -04:00
..
…
2026-09-06 17:13:32 -04:00
2026-08-25 16:53:53 -04:00
2026-09-06 17:27:30 -04:00
2026-09-21 08:59:39 -04:00
2026-09-21 11:09:09 -04:00
2026-08-29 16:14:32 -04:00
2026-08-16 23:21:00 -07:00
2026-09-21 08:59:39 -04:00
2026-09-21 08:59:39 -04:00