configs
Classes
ImportConfigForm
Bases: BaseModel
Form for importing system configuration.
Attributes
config
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.
- Code Reference routers configs Classes ConfigsClient Functions
- Code Reference routers configs Classes ConfigsClient Functions set_connections_config
Attributes
ENABLE_DIRECT_CONNECTIONS
Whether to allow users to connect to their own OpenAI compatible API endpoints directly.
OAuthClientRegistrationForm
Bases: BaseModel
Form for registering an OAuth client.
- Code Reference routers configs Classes ConfigsClient Functions register_oauth_client
Attributes
client_secret
Static OAuth client secret. When provided, skips dynamic registration and uses static credentials.
oauth_server_url
Override for the OAuth server URL. Defaults to the url field if not provided.
oauth_scope
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.
- Code Reference models configs Classes ToolServersConfigForm Attributes TOOL_SERVER_CONNECTIONS
- Code Reference routers configs Classes ConfigsClient Functions verify_tool_servers_config
Attributes
auth_type
Authentication type. Common values: 'bearer', 'session', 'system_oauth', 'oauth_2.1'.
headers
Custom headers to send with requests to the tool server.
Dict Fields
Authorization(str, optional): Authorization header for tool server authenticationContent-Type(str, optional): Content type header for requestsX-OpenWebUI-User-Name(str, optional): User name header for user contextX-OpenWebUI-Chat-Id(str, optional): Chat ID header for context trackingAccept(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.
config
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
Server metadata and identification info.
Dict Fields
id(str, optional): Server identifier used for OAuth client managementoauth_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.
- Code Reference routers configs Classes ConfigsClient Functions
- Code Reference routers configs Classes ConfigsClient Functions set_tool_servers_config
Attributes
TOOL_SERVER_CONNECTIONS
TOOL_SERVER_CONNECTIONS: List[ToolServerConnection]
List of configured tool server connections.
CodeInterpreterConfigForm
Bases: BaseModel
Configuration for code execution and interpreter.
- Code Reference routers configs Classes ConfigsClient Functions
- Code Reference routers configs Classes ConfigsClient Functions set_code_execution_config
Attributes
CODE_EXECUTION_ENGINE
Engine for code execution. Supported: 'pyodide', 'jupyter'.
CODE_EXECUTION_JUPYTER_URL
URL for Jupyter server (if engine is jupyter).
CODE_EXECUTION_JUPYTER_AUTH
Auth method for Jupyter. Supported: 'token', 'password', or empty/None.
CODE_EXECUTION_JUPYTER_AUTH_TOKEN
Token for Jupyter auth.
CODE_EXECUTION_JUPYTER_AUTH_PASSWORD
Password for Jupyter auth.
CODE_EXECUTION_JUPYTER_TIMEOUT
Timeout for code execution in seconds.
ENABLE_CODE_INTERPRETER
Enable code interpreter feature (e.g. for chat).
CODE_INTERPRETER_ENGINE
Engine for code interpreter. Supported: 'pyodide', 'jupyter'.
CODE_INTERPRETER_PROMPT_TEMPLATE
Custom prompt template for the code interpreter.
CODE_INTERPRETER_JUPYTER_URL
URL for Jupyter server (if interpreter engine is jupyter).
CODE_INTERPRETER_JUPYTER_AUTH
Auth method for Jupyter interpreter. Supported: 'token', 'password', or empty/None.
CODE_INTERPRETER_JUPYTER_AUTH_TOKEN
Token for Jupyter interpreter auth.
CODE_INTERPRETER_JUPYTER_AUTH_PASSWORD
Password for Jupyter interpreter auth.
ModelsConfigForm
Bases: BaseModel
Configuration for model defaults and ordering.
- Code Reference routers configs Classes ConfigsClient Functions
- Code Reference routers configs Classes ConfigsClient Functions set_models_config
Attributes
DEFAULT_MODELS
Comma-separated list of default model IDs (e.g. for new chats).
DEFAULT_PINNED_MODELS
Comma-separated list of pinned model IDs.
MODEL_ORDER_LIST
List of model IDs specifying the display order.
DEFAULT_MODEL_METADATA
Default metadata for models.
Dict Fields
Additional key-value pairs defining default model metadata. The specific keys depend on the model provider and configuration.
PromptSuggestion
Bases: BaseModel
A prompt suggestion for the chat interface.
- Code Reference
SetDefaultSuggestionsForm
Bases: BaseModel
Form for setting default prompt suggestions.
- Code Reference routers configs Classes ConfigsClient Functions set_default_suggestions
Attributes
BannerModel
Bases: BaseModel
Model representing a banner notification.
- Code Reference
Attributes
SetBannersForm
Bases: BaseModel
Form for setting banners.
- Code Reference routers configs Classes ConfigsClient Functions set_banners
Attributes
TerminalServerConnection
Bases: BaseModel
Configuration for a single terminal server connection.
- Code Reference models configs Classes TerminalServersConfigForm Attributes TERMINAL_SERVER_CONNECTIONS
- Code Reference routers configs Classes ConfigsClient Functions verify_terminal_server
Attributes
config
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
Type of terminal server. 'orchestrator' manages multiple terminals, 'terminal' is a plain terminal server.
policy_id
ID of the policy assigned to this terminal server from an orchestrator.
TerminalServersConfigForm
Bases: BaseModel
Configuration for terminal servers.
- Code Reference routers configs Classes ConfigsClient Functions
- Code Reference routers configs Classes ConfigsClient Functions set_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.
- Code Reference routers configs Classes ConfigsClient Functions put_terminal_server_policy
Attributes
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).
- Code Reference routers configs Classes ConfigsClient Functions put_terminal_server_lifecycle
Attributes
url
Base URL of the orchestrator terminal server. Trailing slash is stripped by the backend.
key
Bearer token for orchestrator auth. Only applied when auth_type is 'bearer'.
auth_type
Auth scheme. Only 'bearer' is honored by the proxy; other values send no auth header.
lifecycle_data
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.
- Code Reference routers configs Classes ConfigsClient Functions refresh_terminal_server_terminals
Attributes
url
Base URL of the orchestrator terminal server. Trailing slash is stripped by the backend.
key
Bearer token for orchestrator auth. Only applied when auth_type is 'bearer'.
auth_type
Auth scheme. Only 'bearer' is honored by the proxy; other values send no auth header.
user_id
Optional user ID. When set, restrict the operation to terminals owned by this user.
policy_id
Optional policy ID. When set, restrict the operation to terminals under this policy.