Page:
Resources model
Pages
Data sources channel
Data sources config_export
Data sources file
Data sources files
Data sources group
Data sources knowledge
Data sources model
Data sources ollama_connection_verify
Data sources openai_connection_verify
Data sources pipeline
Data sources prompt
Data sources skill
Data sources tool
Data sources tool_server
Data sources tool_server_verify
Data sources user
Home
Resources admin_config
Resources audio_config
Resources banners_config
Resources channel
Resources chat_config
Resources code_execution_config
Resources config_import
Resources connections_config
Resources default_user_permissions
Resources evaluation_config
Resources file
Resources function
Resources function_valves
Resources group
Resources group_features
Resources images_config
Resources knowledge
Resources knowledge_file
Resources ldap_config
Resources model
Resources model_settings
Resources models_config
Resources oauth_client
Resources oauth_picture_links
Resources oauth_roles
Resources ollama_connections
Resources openai_connection_models
Resources openai_connections
Resources pipeline
Resources pipeline_valves
Resources prompt
Resources rag_config
Resources rag_embedding_config
Resources skill
Resources subagents_config
Resources suggestions_config
Resources task_config
Resources terminal_server
Resources tool
Resources tool_server
Resources tool_server_access
Resources tool_servers_config
Resources tool_valves
Resources user
Resources videos_config
No results
1
Resources model
Forgejo Actions edited this page 2026-11-26 06:34:52 +00:00
openwebui_model (Resource)
Manages a custom model definition in Open WebUI. A model overlays an existing backend model (set via base_model_id) with custom parameters, capabilities, and access controls.
Example Usage
resource "openwebui_model" "example" {
model_id = "custom-rag"
name = "Custom RAG Model"
base_model_id = "llama3.2"
is_active = true
description = "RAG-tuned model for the internal knowledge base"
read_groups = ["Support"]
write_groups = ["Support"]
# A grant can also name one account. Write the mail address the account signs
# in with, or its user ID.
read_users = ["contractor@example.com"]
# Skills the model loads with every conversation, by skill_id.
skill_ids = ["code-review"]
params = {
temperature = 0.1
num_ctx = 4096
}
capabilities = {
vision = false
web_search = true
}
}
Schema
Required
model_id(String) Unique identifier for the model, e.g.custom-rag.name(String) Display name shown in the Open WebUI interface.params(Attributes) Model parameter overrides. The block is required, and every attribute inside it is optional, so a model that changes no parameter writesparams = {}. A parameter left out keeps whatever the base model uses. (see below for nested schema)
Optional
base_model_id(String) Identifier of the underlying model to use as a base, e.g.llama3.2orgpt-4o.capabilities(Attributes) Feature capability toggles for this model. (see below for nested schema)default_feature_ids(List of String) List of feature IDs enabled by default, e.g.["web_search"].description(String) Short description shown alongside the model name.hidden(Boolean) Whentrue, the model is hidden from the model selector list in the UI but remains usable via the API. It is not the same asis_active. A hidden model is still active.is_active(Boolean) Whether the model is visible and available to users. Defaults tofalse.knowledge_ids(List of String) List of knowledge base IDs attached to the model. Open WebUI stores a copy of each knowledge base undermeta.knowledge; the provider resolves the IDs on write and reports only the IDs on read. Knowledge entries attached in the web UI that name a single file or note are not represented here, and setting this attribute replaces them.meta_additional_json(String) Additional metadata JSON merged into the model'smetaobject. e.g.jsonencode({ info = "custom" }). Two keys never appear here:knowledge, whichknowledge_idsmanages, andchat_variables_schema, which Open WebUI derives from the system prompt on every read.params_additional_json(String) Additional model parameters JSON merged intoparams, for fields not covered by theparamsblock. e.g.jsonencode({ top_p = 0.9 }).profile_image_url(String) URL of the model's profile image. Open WebUI accepts an empty string,/user.png,/favicon.png,/static/favicon.png,/api/v1/users/{id}/profile/image, anhttp(s)URL with a host, or adata:image/{png,jpeg,gif,webp};base64,URI. It drops anything else without an error.public_read(Boolean) Whether every signed-in user can read the model. This is what the web UI calls public sharing.public_write(Boolean) Whether every signed-in user can edit the model.read_groups(List of String) List of group names or IDs granted read access. With no groups, no users, and neitherpublic_readnorpublic_write, the model is visible to its owner and to admins only.read_users(List of String) List of user email addresses or IDs granted read access.skill_ids(List of String) List of skill IDs to attach to the model by default.suggestion_prompts(List of String) List of suggested starter prompts shown when the model is selected.tags(List of String) List of tags for categorising the model.tool_ids(List of String) List of tool IDs to attach to the model by default.write_groups(List of String) List of group names or IDs granted write access.write_users(List of String) List of user email addresses or IDs granted write access. Name the same address inread_usersas well.
Read-Only
created_at(Number) Unix timestamp of when the model was created. Set by Open WebUI.id(String) Terraform identifier. Always equal tomodel_id.updated_at(Number) Unix timestamp of when the model was last updated. Set by Open WebUI.user_id(String) Owner user identifier. Set by Open WebUI.
Nested Schema for params
Optional:
custom_params(Map of String) Additional key/value parameters passed through to Open WebUI.format(String) Output format, e.g.json.frequency_penalty(Number) Penalty scaled by token frequency.function_calling(String) Function calling mode, e.g."auto".keep_alive(String) How long to keep the model loaded in memory, e.g."5m".max_tokens(Number) Maximum number of tokens to generate.min_p(Number) Minimum probability threshold for token sampling.mirostat(Number) Mirostat sampling mode: 0 = disabled, 1 = Mirostat, 2 = Mirostat 2.0.mirostat_eta(Number) Mirostat learning rate. It sets how fast the sampler reacts to the generated text.mirostat_tau(Number) Mirostat target entropy. A lower value makes the output more focused.num_batch(Number) Batch size for prompt processing.num_ctx(Number) Context window size in tokens.num_gpu(Number) Number of GPU layers to use.num_keep(Number) Number of tokens to retain from the previous context.num_thread(Number) Number of CPU threads to use for inference.presence_penalty(Number) Penalty for tokens that have appeared at all.reasoning_effort(String) Reasoning effort level for models that support it, e.g."high".reasoning_tags(List of String) List of XML tags used to delimit reasoning tokens.repeat_last_n(Number) Number of tokens to look back for repeat penalty.repeat_penalty(Number) Penalty applied to repeated tokens.seed(Number) Random seed for reproducible outputs.stream_delta_chunk_size(Number) Chunk size in tokens for streaming responses.stream_response(Boolean) Whether to stream the response. Defaults to the base model setting.system(String) System prompt prepended to every conversation.temperature(Number) Sampling temperature, 0 to 2. Lower values are more deterministic.tfs_z(Number) Tail free sampling z parameter.think(Boolean) Whether to enable chain-of-thought reasoning.top_k(Number) Top-k sampling: number of highest-probability tokens to consider.top_p(Number) Nucleus sampling probability threshold.use_mlock(Boolean) Whether to lock model weights in RAM.use_mmap(Boolean) Whether to use memory-mapped files for model weights.
Nested Schema for capabilities
Optional:
builtin_tools(Boolean) Whether Open WebUI's built-in tools are offered to the model. Defaults totrue.citations(Boolean) Whether the model returns citations.code_interpreter(Boolean) Whether code interpreter is available.file_context(Boolean) Whether uploaded files go into the prompt as context. Whenfalse, the model reaches them through the file search tool instead. Defaults totrue.file_upload(Boolean) Whether file uploads are allowed in chat.image_generation(Boolean) Whether image generation is available.memory(Boolean) Whether the model reads and writes user memories. Defaults totrue.status_updates(Boolean) Whether the model emits status update messages.terminal(Boolean) Whether the model can run terminal commands. Defaults totrue.usage(Boolean) Whether token usage statistics are returned.vision(Boolean) Whether the model accepts image inputs.web_search(Boolean) Whether web search is available.
Import
Import is supported using the following syntax:
The terraform import command can be used, for example:
# A model is imported by its model_id, the identifier the API and the model
# picker use.
terraform import openwebui_model.example custom-rag
Data sources
- openwebui_channel (Data Source)
- openwebui_config_export (Data Source)
- openwebui_file (Data Source)
- openwebui_files (Data Source)
- openwebui_group (Data Source)
- openwebui_knowledge (Data Source)
- openwebui_model (Data Source)
- openwebui_ollama_connection_verify (Data Source)
- openwebui_openai_connection_verify (Data Source)
- openwebui_pipeline (Data Source)
- openwebui_prompt (Data Source)
- openwebui_skill (Data Source)
- openwebui_tool (Data Source)
- openwebui_tool_server (Data Source)
- openwebui_tool_server_verify (Data Source)
- openwebui_user (Data Source)
Resources
- openwebui_admin_config (Resource)
- openwebui_audio_config (Resource)
- openwebui_banners_config (Resource)
- openwebui_channel (Resource)
- openwebui_chat_config (Resource)
- openwebui_code_execution_config (Resource)
- openwebui_config_import (Resource)
- openwebui_connections_config (Resource)
- openwebui_default_user_permissions (Resource)
- openwebui_evaluation_config (Resource)
- openwebui_file (Resource)
- openwebui_function (Resource)
- openwebui_function_valves (Resource)
- openwebui_group (Resource)
- openwebui_group_features (Resource)
- openwebui_images_config (Resource)
- openwebui_knowledge (Resource)
- openwebui_knowledge_file (Resource)
- openwebui_ldap_config (Resource)
- openwebui_model (Resource)
- openwebui_model_settings (Resource)
- openwebui_models_config (Resource)
- openwebui_oauth_client (Resource)
- openwebui_oauth_picture_links (Resource)
- openwebui_oauth_roles (Resource)
- openwebui_ollama_connections (Resource)
- openwebui_openai_connection_models (Resource)
- openwebui_openai_connections (Resource)
- openwebui_pipeline (Resource)
- openwebui_pipeline_valves (Resource)
- openwebui_prompt (Resource)
- openwebui_rag_config (Resource)
- openwebui_rag_embedding_config (Resource)
- openwebui_skill (Resource)
- openwebui_subagents_config (Resource)
- openwebui_suggestions_config (Resource)
- openwebui_task_config (Resource)
- openwebui_terminal_server (Resource)
- openwebui_tool (Resource)
- openwebui_tool_server (Resource)
- openwebui_tool_server_access (Resource)
- openwebui_tool_servers_config (Resource)
- openwebui_tool_valves (Resource)
- openwebui_user (Resource)
- openwebui_videos_config (Resource)
Published from docs/ (refs/tags/v0.1.0-dev.10, a40bd0a133e7). Edit the source in a pull request; wiki edits are replaced on the next publish.