Skip to content

configs

Classes

ImportConfigForm

Bases: BaseModel

Form for importing system configuration.

Attributes

config
config: Dict[str, Any]

The configuration dictionary to import. This should match the structure returned by the export endpoint.

Dict Fields

This dictionary contains the complete Open WebUI configuration that can be exported and imported. It includes all settings from the backend config system. For a complete reference of all possible keys and their descriptions, see the backend configuration in: owui_client/refs/owui_source_main/backend/open_webui/main.py

The config includes but is not limited to: - API integrations (Ollama, OpenAI, etc.) - Feature flags (folders, channels, notes, etc.) - Authentication settings (OAuth, LDAP, etc.) - RAG and retrieval configurations - Image generation and editing settings - Audio processing configurations - Web search and loader configurations - Code execution and interpreter settings - UI and permission settings

ConnectionsConfigForm

Bases: BaseModel

Configuration for system connections.

Attributes

ENABLE_DIRECT_CONNECTIONS
ENABLE_DIRECT_CONNECTIONS: bool

Whether to allow users to connect to their own OpenAI compatible API endpoints directly.

ENABLE_BASE_MODELS_CACHE
ENABLE_BASE_MODELS_CACHE: bool

Whether to cache the base model list. speeeds up access by fetching base models only at startup or on settings save.

OAuthClientRegistrationForm

Bases: BaseModel

Form for registering an OAuth client.

Attributes

url
url: str

The URL of the service to register with (e.g. Tool Server URL).

client_id
client_id: str

Unique identifier for the client.

client_name
client_name: Optional[str] = None

Optional name for the client.

client_secret
client_secret: Optional[str] = None

Static OAuth client secret. When provided, skips dynamic registration and uses static credentials.

oauth_server_url
oauth_server_url: Optional[str] = None

Override for the OAuth server URL. Defaults to the url field if not provided.

oauth_scope
oauth_scope: Optional[str] = None

OAuth scope(s) to request during client registration.

A single string of whitespace- and/or comma-separated scope tokens (e.g. "openid email profile" or "openid,email,profile"); the backend normalizes both separators. When omitted/None the backend falls back to the scopes advertised by the resource's Protected Resource Metadata (RFC 9728) during dynamic client registration.

ToolServerConnection

Bases: BaseModel

Configuration for a single tool server connection.

Attributes

url
url: str

Base URL of the tool server.

path
path: str

Path/Prefix for the tools (e.g. /api/v1).

type
type: Optional[str] = 'openapi'

Type of tool server. Supported values: 'openapi', 'mcp'.

auth_type
auth_type: Optional[str] = None

Authentication type. Common values: 'bearer', 'session', 'system_oauth', 'oauth_2.1'.

headers
headers: Optional[Union[Dict[str, Any], str]] = None

Custom headers to send with requests to the tool server.

Dict Fields
  • Authorization (str, optional): Authorization header for tool server authentication
  • Content-Type (str, optional): Content type header for requests
  • X-OpenWebUI-User-Name (str, optional): User name header for user context
  • X-OpenWebUI-Chat-Id (str, optional): Chat ID header for context tracking
  • Accept (str, optional): Accept header for response content type
  • Any other custom headers needed for specific tool server requirements

The headers dictionary allows customization of HTTP headers sent to tool servers. Common use cases include: - Adding authentication headers beyond the standard bearer token - Setting custom content types for specific API requirements - Forwarding user information headers when ENABLE_FORWARD_USER_INFO_HEADERS is enabled - Including chat context headers for tracking and logging purposes

When provided as a string, it should be a JSON-encoded dictionary.

key
key: Optional[str] = None

API Key or Token for bearer auth.

config
config: Optional[Dict[str, Any]] = None

Additional configuration for the connection.

Dict Fields
  • enable (bool, optional): Whether the tool server connection is enabled. Defaults to True.
  • function_name_filter_list (str, optional): Comma-separated list of function names to filter/allow for this tool server. Used to restrict which functions from the tool server are exposed.
  • access_control (dict, optional): Access control configuration for the tool server connection. Defines permissions and restrictions for user access.
  • oauth_server_key (str, optional): OAuth server key for OAuth 2.1 authentication with MCP tool servers. Used during dynamic client registration.

The config dictionary provides additional connection-specific settings that control behavior, security, and functionality of the tool server integration.

info
info: Optional[Dict[str, Any]] = None

Server metadata and identification info.

Dict Fields
  • id (str, optional): Server identifier used for OAuth client management
  • oauth_server_url (str, optional): Override URL for the OAuth authorization server
  • Additional keys may be present depending on server type and configuration

ToolServersConfigForm

Bases: BaseModel

Configuration for tool servers.

Attributes

TOOL_SERVER_CONNECTIONS
TOOL_SERVER_CONNECTIONS: List[ToolServerConnection]

List of configured tool server connections.

CodeInterpreterConfigForm

Bases: BaseModel

Configuration for code execution and interpreter.

Attributes

ENABLE_CODE_EXECUTION
ENABLE_CODE_EXECUTION: bool

Enable general code execution (e.g. for tools).

CODE_EXECUTION_ENGINE
CODE_EXECUTION_ENGINE: str

Engine for code execution. Supported: 'pyodide', 'jupyter'.

CODE_EXECUTION_JUPYTER_URL
CODE_EXECUTION_JUPYTER_URL: Optional[str] = None

URL for Jupyter server (if engine is jupyter).

CODE_EXECUTION_JUPYTER_AUTH
CODE_EXECUTION_JUPYTER_AUTH: Optional[str] = None

Auth method for Jupyter. Supported: 'token', 'password', or empty/None.

CODE_EXECUTION_JUPYTER_AUTH_TOKEN
CODE_EXECUTION_JUPYTER_AUTH_TOKEN: Optional[str] = None

Token for Jupyter auth.

CODE_EXECUTION_JUPYTER_AUTH_PASSWORD
CODE_EXECUTION_JUPYTER_AUTH_PASSWORD: Optional[str] = None

Password for Jupyter auth.

CODE_EXECUTION_JUPYTER_TIMEOUT
CODE_EXECUTION_JUPYTER_TIMEOUT: Optional[int] = None

Timeout for code execution in seconds.

ENABLE_CODE_INTERPRETER
ENABLE_CODE_INTERPRETER: bool

Enable code interpreter feature (e.g. for chat).

CODE_INTERPRETER_ENGINE
CODE_INTERPRETER_ENGINE: str

Engine for code interpreter. Supported: 'pyodide', 'jupyter'.

CODE_INTERPRETER_PROMPT_TEMPLATE
CODE_INTERPRETER_PROMPT_TEMPLATE: Optional[str] = None

Custom prompt template for the code interpreter.

CODE_INTERPRETER_JUPYTER_URL
CODE_INTERPRETER_JUPYTER_URL: Optional[str] = None

URL for Jupyter server (if interpreter engine is jupyter).

CODE_INTERPRETER_JUPYTER_AUTH
CODE_INTERPRETER_JUPYTER_AUTH: Optional[str] = None

Auth method for Jupyter interpreter. Supported: 'token', 'password', or empty/None.

CODE_INTERPRETER_JUPYTER_AUTH_TOKEN
CODE_INTERPRETER_JUPYTER_AUTH_TOKEN: Optional[str] = None

Token for Jupyter interpreter auth.

CODE_INTERPRETER_JUPYTER_AUTH_PASSWORD
CODE_INTERPRETER_JUPYTER_AUTH_PASSWORD: Optional[str] = None

Password for Jupyter interpreter auth.

CODE_INTERPRETER_JUPYTER_TIMEOUT
CODE_INTERPRETER_JUPYTER_TIMEOUT: Optional[int] = None

Timeout for interpreter execution in seconds.

ModelsConfigForm

Bases: BaseModel

Configuration for model defaults and ordering.

Attributes

DEFAULT_MODELS
DEFAULT_MODELS: Optional[str] = None

Comma-separated list of default model IDs (e.g. for new chats).

DEFAULT_PINNED_MODELS
DEFAULT_PINNED_MODELS: Optional[str] = None

Comma-separated list of pinned model IDs.

MODEL_ORDER_LIST
MODEL_ORDER_LIST: Optional[List[str]] = None

List of model IDs specifying the display order.

DEFAULT_MODEL_METADATA
DEFAULT_MODEL_METADATA: Optional[dict] = None

Default metadata for models.

Dict Fields

Additional key-value pairs defining default model metadata. The specific keys depend on the model provider and configuration.

DEFAULT_MODEL_PARAMS
DEFAULT_MODEL_PARAMS: Optional[dict] = None

Default parameters for models.

Dict Fields

Additional key-value pairs defining default model parameters. The specific keys depend on the model provider and configuration (e.g., temperature, max_tokens).

PromptSuggestion

Bases: BaseModel

A prompt suggestion for the chat interface.

Attributes

title
title: List[str]

List containing [title, subtitle]. E.g. ["Tell me a fun fact", "about the Roman Empire"].

content
content: str

The actual prompt content to be sent when selected.

SetDefaultSuggestionsForm

Bases: BaseModel

Form for setting default prompt suggestions.

Attributes

suggestions
suggestions: List[PromptSuggestion]

List of prompt suggestions to set as default.

BannerModel

Bases: BaseModel

Model representing a banner notification.

Attributes

id
id: str

Unique ID of the banner.

type
type: str

Type of banner. Supported: 'info', 'warning', 'error', 'success'.

title
title: Optional[str] = None

Title of the banner (optional).

content
content: str

Content of the banner. Supports Markdown.

dismissible
dismissible: bool = True

Whether the banner can be dismissed by the user.

timestamp
timestamp: int

Timestamp of creation/update.

SetBannersForm

Bases: BaseModel

Form for setting banners.

Attributes

banners
banners: List[BannerModel]

List of banners to display.

TerminalServerConnection

Bases: BaseModel

Configuration for a single terminal server connection.

Attributes

id
id: Optional[str] = ''

Unique identifier for the terminal server connection.

name
name: Optional[str] = ''

Display name for the terminal server.

enabled
enabled: Optional[bool] = True

Whether the terminal server connection is enabled.

url
url: str

Base URL of the terminal server.

path
path: Optional[str] = '/openapi.json'

Path to the OpenAPI spec (default: /openapi.json).

key
key: Optional[str] = ''

API Key or Token for authentication.

auth_type
auth_type: Optional[str] = 'bearer'

Authentication type. Common values: 'bearer', 'none'.

config
config: Optional[Dict[str, Any]] = None

Additional configuration for the connection.

Dict Fields
  • enable (bool, optional): Whether the terminal server connection is enabled
  • Additional keys may be used for provider-specific settings
server_type
server_type: Optional[str] = None

Type of terminal server. 'orchestrator' manages multiple terminals, 'terminal' is a plain terminal server.

policy_id
policy_id: Optional[str] = None

ID of the policy assigned to this terminal server from an orchestrator.

policy
policy: Optional[Dict[str, Any]] = None

Cached policy data fetched from the orchestrator.

Dict Fields

Policy structure is defined by the orchestrator terminal server's API. See the orchestrator's /api/v1/policies endpoint for details.

TerminalServersConfigForm

Bases: BaseModel

Configuration for terminal servers.

Attributes

TERMINAL_SERVER_CONNECTIONS
TERMINAL_SERVER_CONNECTIONS: List[TerminalServerConnection]

List of configured terminal server connections.

TerminalServerPolicyForm

Bases: BaseModel

Form for pushing a policy to an orchestrator terminal server.

Attributes

url
url: str

Base URL of the orchestrator terminal server.

key
key: Optional[str] = ''

API key or bearer token for authentication.

auth_type
auth_type: Optional[str] = 'bearer'

Authentication type. Common values: 'bearer', 'none'.

policy_id
policy_id: str

ID of the policy to create or update.

policy_data
policy_data: Dict[str, Any]

Policy data to send to the orchestrator.

Dict Fields

Policy structure is defined by the orchestrator terminal server's API. See the orchestrator's /api/v1/policies endpoint for details.

TerminalServerLifecycleForm

Bases: BaseModel

Form for pushing a session-lifecycle policy to an orchestrator terminal server.

Open WebUI proxies this verbatim to the orchestrator; only bearer auth is wired into the proxy (any other auth_type sends no Authorization header).

Attributes

url
url: str

Base URL of the orchestrator terminal server. Trailing slash is stripped by the backend.

key
key: Optional[str] = ''

Bearer token for orchestrator auth. Only applied when auth_type is 'bearer'.

auth_type
auth_type: Optional[str] = 'bearer'

Auth scheme. Only 'bearer' is honored by the proxy; other values send no auth header.

policy_id
policy_id: str

ID of the policy whose lifecycle should be updated on the orchestrator.

lifecycle_data
lifecycle_data: Dict[str, Any]

Opaque lifecycle policy body forwarded verbatim to the orchestrator.

Dict Fields

Structure is defined entirely by the orchestrator terminal server's /api/v1/policies/{policy_id}/lifecycle endpoint. The frontend sends an arbitrary JSON object (default {}) entered by an admin; Open WebUI does not interpret or validate its contents.

TerminalServerRefreshForm

Bases: BaseModel

Form for refreshing or resetting running terminal sessions on an orchestrator.

Proxied to the orchestrator's /api/v1/terminals/refresh endpoint. only_idle and reset are always forwarded; user_id and policy_id are forwarded only when set, narrowing the targeted sessions. Only bearer auth is wired into the proxy.

Attributes

url
url: str

Base URL of the orchestrator terminal server. Trailing slash is stripped by the backend.

key
key: Optional[str] = ''

Bearer token for orchestrator auth. Only applied when auth_type is 'bearer'.

auth_type
auth_type: Optional[str] = 'bearer'

Auth scheme. Only 'bearer' is honored by the proxy; other values send no auth header.

user_id
user_id: Optional[str] = None

Optional user ID. When set, restrict the operation to terminals owned by this user.

policy_id
policy_id: Optional[str] = None

Optional policy ID. When set, restrict the operation to terminals under this policy.

only_idle
only_idle: bool = True

When True (default), only refresh/reset idle terminal sessions.

reset
reset: bool = False

When True, reset sessions (tear down and recreate) instead of just refreshing them.