When an admin sets default tools in the Model Defaults settings, creating a new model in the workspace still starts with no tools selected. The new model form now preselects those default tools.
Workspace tools could only be enabled per model, so every model had to be edited to get a tool auto-enabled in new chats. The Model Defaults section in the admin Models settings now has a Tools picker. Models without their own tool list start new chats with those tools enabled; models with their own list keep it.
* 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.
The Access button in the model, prompt, tool, knowledge, skill and note editors, the Access entry in their list menus and the Access button in folder settings showed to users without the matching sharing permission. The dialog then had nothing they could change. The button and the menu entry now only show to users who may share that kind of item, and admins see them as before.
Refs #32830
The model editor dropped meta.defaultFeatureIds when the list was empty.
When Admin Settings > Models > Model Defaults turns a default feature on,
the backend fills in that default for any model without the key, so
switching the last feature off on a model saved nothing and the admin
default came back on reopen and in new chats.
Keep the empty list when the admin default is not empty, so the model's
choice is stored and overrides it.
When Admin Settings > Models > Model Defaults turns a built-in tool off,
a model that turns it back on lost that choice on Save. The editor seeds
the model's builtinTools with the admin defaults object itself, and
setBuiltinTool deleted the tool's key in place, so the admin defaults
changed too. The empty map was then dropped on save, and the backend
filled in the admin default again.
Update a copy of the map in setBuiltinTool, as the Default Features
toggles in Capabilities.svelte already build a new list, and keep the
empty map when the admin default is not empty, so the model's choice is
stored and overrides it.