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.

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.

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.

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.