3 Resources model_settings
Forgejo Actions edited this page 2026-11-27 06:05:15 +00:00

openwebui_model_settings (Resource)

Owns selected fields of one Open WebUI model record. An attribute left out keeps its current value. Everything else on the record (system prompt, other capabilities, knowledge, other parameters, base model, active flag) is sent back as read, and an apply that would change any of it fails. A missing record is created with only the set fields. Destroying the resource leaves the record in place. Use it instead of openwebui_model when another process or the admin UI owns the rest of the record.

Example Usage

# Own the name, picture, default tools and access of a model the connection
# publishes. Prompts, capabilities and other parameters stay as set in Open WebUI.
resource "openwebui_model_settings" "sonnet" {
  model_id          = "claude-sonnet"
  name              = "Claude Sonnet"
  description       = "Claude's balanced frontier model."
  profile_image_url = "data:image/webp;base64,${filebase64("${path.module}/sonnet.webp")}"
  tool_ids          = ["server:mcp:corn"]
  reasoning_effort  = "high"
  read_access       = ["group:Plus"]
  write_access      = []
}

Schema

Required

  • model_id (String) The model ID, as published by the connection.

Optional

  • compact_token_threshold (Number) params.compact_token_threshold: context size at which a chat is compacted.
  • description (String) Description shown in the model selector (meta.description).
  • hidden (Boolean) Hidden from the model selector (meta.hidden).
  • name (String) Display name.
  • profile_image_url (String) Model image: a base64 data:image/png|jpeg|gif|webp URI of at most 2 MiB, or an http(s) URL. The same picture spelled differently is not a change.
  • read_access (Set of String) Who may use the model: public, group:<name>, user:<email> (or group-id:/user-id:). Set with write_access to own the whole grant list; [] is admins only.
  • reasoning_effort (String) params.reasoning_effort.
  • tool_ids (Set of String) Tools a new chat with this model starts with (meta.toolIds), e.g. server:mcp:<id>. Order is ignored.
  • video_generation (Boolean) meta.capabilities.video_generation: whether chats with this model may offer video generation (the site switch and the user's permission also apply). Reads as null while unset, which Open WebUI treats as on. Only this capability is written; the others are sent back as read.
  • video_generation_default (Boolean) Whether a new chat with this model starts with video generation switched on: the presence of video_generation in meta.defaultFeatureIds. Only that entry is added or removed; the other default features and their order stay as they are.
  • write_access (Set of String) Who may edit the model: group:<name>, user:<email>. public is not allowed.

Read-Only

  • id (String) The model ID.

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

# The model ID.
tofu import openwebui_model_settings.sonnet claude-sonnet