* fix: built-in tool toggles show while their feature is off
The model editor listed the Memory, Notes, Channels, Notifications, Web Search, Image Generation, Code Interpreter, Automations, Calendar and Sub-agents built-in tools even when the admin had turned that feature off for the whole instance, where those toggles do nothing. Each of them is now hidden while its feature is off, and the choices saved on a model are kept for when it is turned back on. The server now also reports whether sub-agents are on, and saving the Sub-agents settings updates the editor without a reload.
Refs #32830
* refac: name the feature switch map like the rest of the codebase
Uses the same name the model capabilities change uses for its matching map.
* refac: keep each tool's feature switch next to its label
Each built-in tool now carries its feature switch alongside its label and description, so the list is defined in one place.
Settings > Interface showed the Web Search Query Generation switch even with web search turned off, where it has no effect. It now only shows while web search is on, and its stored value is kept.
Refs #32830
* fix: image engine settings show while image generation is off
Settings > Images showed the image engine, its credentials and the whole image edit section even with image generation turned off. They now only show while the Image Generation switch is on, and flipping it on shows them right away, so everything can be set up before saving. Stored engine settings and keys are kept.
Refs #32830
* fix: saving image settings without a required key turns image generation off
Saving Settings > Images with Image Generation on but a required URL or API key empty showed an "is required" error and flipped the switch back off, which now also hid the field that needed filling. The switch now stays on with the error, so the missing value can be filled in and saved right away. Nothing is saved until then.
Refs #32830
* refac: always require the Gemini API key while image generation is on
The key field only shows while image generation is on, so it is simply required now.
* refac: drop the stray blank lines left in the image settings save checks
Each missing-setting check now shows its error and stops right away, with no leftover gap from the removed lines.
* fix: web search engine settings show while web search is off
Settings > Web Search showed the search engine picker and all engine credentials even with web search turned off. They now only show while the Web Search switch is on, and flipping it on shows them right away, so the engine can be set up before saving. An API key the web loader shares with the hidden engine now shows in the loader section instead. Stored engine settings and keys are kept.
Refs #32830
* fix: web search confirmation and Bypass Web Loader show while web search is off
The Web Search Confirmation switch, its text and the Bypass Web Loader switch also showed with web search turned off, although they only act on web searches. They now hide together with the engine settings, and their stored values are kept. Bypass Embedding and Retrieval and Trust Proxy Environment stay visible, since they also apply to web pages attached to a chat.
Refs #32830
* refac: mark web search fields as plainly required
These fields only show while web search is on, so tying their required flag to the toggle no longer does anything.
* refac: write the web search checks inline
Same behaviour, the conditions now sit directly where they are used.
* fix: Terminal capability shows while no terminal server exists
The Terminal capability showed in the model editor even when the admin had set up no terminal server and direct integrations were off, which is the default, so it did nothing. It now shows only when an enabled terminal server exists or users can add their own through direct integrations, and the value saved on a model is kept. The server now reports whether any enabled terminal server exists, since the editor itself only sees the servers the current user can access and a model can be shared with other users.
Refs #32830
* fix: hide the default terminal picker when no terminal is available
The model editor still showed the default terminal line when no terminal server or direct integration was available. It now follows the same rule as the Terminal capability.
Users > Groups and the default permissions showed toggles such as Web Search, Channels, Notes, API Keys or Rate Response even when the admin had turned that feature off for the whole instance, so changing them did nothing. Each of these toggles, and the sharing toggles for notes, folders and calendars, now only shows while its feature is on. Stored permission values are kept, so turning a feature back on restores each group's setting.
Refs #32830
Text shown in a tooltip was treated as markup, so a name, path or description containing angle brackets came out mangled or partly missing. Tooltips now show their text as written, and the few places that deliberately show formatted content ask for it explicitly.
On a fresh install the image generation engine is OpenAI with no key, and saving Admin Settings > Images failed with "OpenAI API Key is required." even with Image Generation switched off, which blocked every change on the page, including setting up Image Edit with another engine. Image Edit had the same problem: with Gemini as its engine and no key, the page refused to save even with Image Edit off. Each engine's key or URL is now only asked for while its feature is on, so switching Image Generation or Image Edit on without one is still refused.
Fixes#32835
With web search off, clicking Save on the Web Search settings page jumped to an empty search engine field and saved nothing. That happened with no engine picked, which is how a fresh install starts, and also when an engine picked earlier was missing its own details, such as the SearXNG query URL. Admins could not change the Web Loader settings, which apply whenever a user attaches a web page, without filling in a search engine first. The engine and its details are now only required while web search is turned on.
Fixes#32831