Table of contents
openwebui_rag_config (Resource)
Manages Open WebUI's retrieval settings: document loaders, chunking, reranking, file limits, and web search.
The top-level keys keep their stored value when a request leaves them out, but every key of the web block is written on every write. This resource therefore reads the current configuration and overlays the attributes the plan names, so a partial configuration never clears a key it does not mention.
POST /api/v1/retrieval/config/update answers with a response that omits five of the keys the GET returns, so this resource reads the configuration back after every write.
Four keys are loaded but unreachable through this router: AZURE_AI_SEARCH_API_KEY, AZURE_AI_SEARCH_ENDPOINT, AZURE_AI_SEARCH_INDEX_NAME, and TIKTOKEN_ENCODING_NAME. Set them with openwebui_config_import.
YOUTUBE_LOADER_TRANSLATION has no attribute here. It is in WebConfig but not in RETRIEVAL_CONFIG_KEYS, so Open WebUI holds it in process memory and loses it on restart.
Example Usage
# Every attribute this resource does not name keeps the value Open WebUI already
# holds. The web block is the exception: Open WebUI writes all of its keys on
# every write, so the resource reads them back and sends them whole.
resource "openwebui_rag_config" "example" {
chunk_size = 1000
chunk_overlap = 100
top_k = 4
# The empty string removes the limit.
file_max_size = "50"
file_max_count = ""
web = {
enable_web_search = true
web_search_engine = "tavily"
web_search_result_count = 5
tavily_api_key = var.tavily_api_key
}
}
variable "tavily_api_key" {
type = string
sensitive = true
}
Schema
Optional
allowed_file_extensions(List of String) Open WebUI settingALLOWED_FILE_EXTENSIONS. Stored asrag.file.allowed_extensions.bypass_embedding_and_retrieval(Boolean) Open WebUI settingBYPASS_EMBEDDING_AND_RETRIEVAL. Stored asrag.bypass_embedding_and_retrieval.chunk_min_size_target(Number) Open WebUI settingCHUNK_MIN_SIZE_TARGET. Stored asrag.chunk_min_size_target.chunk_overlap(Number) Open WebUI settingCHUNK_OVERLAP. Stored asrag.chunk_overlap.chunk_size(Number) Open WebUI settingCHUNK_SIZE. Stored asrag.chunk_size.content_extraction_engine(String) Open WebUI settingCONTENT_EXTRACTION_ENGINE. Stored asrag.content_extraction_engine.content_extraction_supported_media_mime_types(List of String) Open WebUI settingCONTENT_EXTRACTION_SUPPORTED_MEDIA_MIME_TYPES. Stored asrag.content_extraction.supported_media_mime_types.datalab_marker_additional_config(String) Open WebUI settingDATALAB_MARKER_ADDITIONAL_CONFIG. Stored asrag.datalab_marker_additional_config.datalab_marker_api_base_url(String) Open WebUI settingDATALAB_MARKER_API_BASE_URL. Stored asrag.datalab_marker_api_base_url.datalab_marker_api_key(String, Sensitive) Open WebUI settingDATALAB_MARKER_API_KEY. Stored asrag.datalab_marker_api_key. Sensitive.datalab_marker_disable_image_extraction(Boolean) Open WebUI settingDATALAB_MARKER_DISABLE_IMAGE_EXTRACTION. Stored asrag.datalab_marker_disable_image_extraction.datalab_marker_force_ocr(Boolean) Open WebUI settingDATALAB_MARKER_FORCE_OCR. Stored asrag.datalab_marker_force_ocr.datalab_marker_format_lines(Boolean) Open WebUI settingDATALAB_MARKER_FORMAT_LINES. Stored asrag.datalab_marker_format_lines.datalab_marker_output_format(String) Open WebUI settingDATALAB_MARKER_OUTPUT_FORMAT. Stored asrag.datalab_marker_output_format.datalab_marker_paginate(Boolean) Open WebUI settingDATALAB_MARKER_PAGINATE. Stored asrag.datalab_marker_paginate.datalab_marker_skip_cache(Boolean) Open WebUI settingDATALAB_MARKER_SKIP_CACHE. Stored asrag.datalab_marker_skip_cache.datalab_marker_strip_existing_ocr(Boolean) Open WebUI settingDATALAB_MARKER_STRIP_EXISTING_OCR. Stored asrag.datalab_marker_strip_existing_ocr.datalab_marker_use_llm(Boolean) Open WebUI settingDATALAB_MARKER_USE_LLM. Stored asrag.datalab_marker_use_llm.docling_api_key(String, Sensitive) Open WebUI settingDOCLING_API_KEY. Stored asrag.docling_api_key. Sensitive.docling_params(String) JSON object of extra parameters passed to Docling. Stored asrag.docling_params.docling_server_url(String) Open WebUI settingDOCLING_SERVER_URL. Stored asrag.docling_server_url.document_intelligence_endpoint(String) Open WebUI settingDOCUMENT_INTELLIGENCE_ENDPOINT. Stored asrag.document_intelligence_endpoint.document_intelligence_key(String, Sensitive) Open WebUI settingDOCUMENT_INTELLIGENCE_KEY. Stored asrag.document_intelligence_key. Sensitive.document_intelligence_model(String) Open WebUI settingDOCUMENT_INTELLIGENCE_MODEL. Stored asrag.document_intelligence_model.enable_google_drive_integration(Boolean) Open WebUI settingENABLE_GOOGLE_DRIVE_INTEGRATION. Stored asgoogle_drive.enable.enable_markdown_header_text_splitter(Boolean) Open WebUI settingENABLE_MARKDOWN_HEADER_TEXT_SPLITTER. Stored asrag.enable_markdown_header_text_splitter.enable_onedrive_integration(Boolean) Open WebUI settingENABLE_ONEDRIVE_INTEGRATION. Stored asonedrive.enable.enable_rag_hybrid_search(Boolean) Open WebUI settingENABLE_RAG_HYBRID_SEARCH. Stored asrag.enable_hybrid_search.enable_rag_hybrid_search_enriched_texts(Boolean) Open WebUI settingENABLE_RAG_HYBRID_SEARCH_ENRICHED_TEXTS. Stored asrag.enable_hybrid_search_enriched_texts.external_document_loader_api_key(String, Sensitive) Open WebUI settingEXTERNAL_DOCUMENT_LOADER_API_KEY. Stored asrag.external_document_loader_api_key. Sensitive.external_document_loader_headers(String, Sensitive) JSON object of headers sent to the external document loader. Carries the loader's credentials. Stored asrag.external_document_loader_headers. Sensitive.external_document_loader_url(String) Open WebUI settingEXTERNAL_DOCUMENT_LOADER_URL. Stored asrag.external_document_loader_url.file_image_compression_height(String) Height an uploaded image is compressed to. The empty string turns compression off. Stored asfile.image_compression_height.file_image_compression_width(String) Width an uploaded image is compressed to. The empty string turns compression off. Stored asfile.image_compression_width.file_max_count(String) Largest number of files one chat message may carry. The empty string removes the limit. Stored asrag.file.max_count.file_max_size(String) Largest upload Open WebUI accepts, in megabytes. The empty string removes the limit. Stored asrag.file.max_size.hybrid_bm25_weight(Number) Open WebUI settingHYBRID_BM25_WEIGHT. Stored asrag.hybrid_bm25_weight.mineru_api_key(String, Sensitive) Open WebUI settingMINERU_API_KEY. Stored asrag.mineru_api_key. Sensitive.mineru_api_mode(String) Open WebUI settingMINERU_API_MODE. Stored asrag.mineru_api_mode.mineru_api_timeout(Number) MinerU request timeout in seconds. Open WebUI ships the default as a string and reads it back as either a string or a number. Stored asrag.mineru_api_timeout.mineru_api_url(String) Open WebUI settingMINERU_API_URL. Stored asrag.mineru_api_url.mineru_file_extensions(List of String) Open WebUI settingMINERU_FILE_EXTENSIONS. Stored asrag.mineru_file_extensions.mineru_params(String) JSON object of extra parameters passed to MinerU. Stored asrag.mineru_params.mistral_ocr_api_base_url(String) Open WebUI settingMISTRAL_OCR_API_BASE_URL. Stored asrag.mistral_ocr_api_base_url.mistral_ocr_api_key(String, Sensitive) Open WebUI settingMISTRAL_OCR_API_KEY. Stored asrag.mistral_ocr_api_key. Sensitive.mistral_ocr_use_base64(Boolean) Open WebUI settingMISTRAL_OCR_USE_BASE64. Stored asrag.mistral_ocr_use_base64.paddleocr_vl_base_url(String) Open WebUI settingPADDLEOCR_VL_BASE_URL. Stored asrag.paddleocr_vl_base_url.paddleocr_vl_token(String, Sensitive) Open WebUI settingPADDLEOCR_VL_TOKEN. Stored asrag.paddleocr_vl_token. Sensitive.pdf_extract_images(Boolean) Open WebUI settingPDF_EXTRACT_IMAGES. Stored asrag.pdf_extract_images.pdf_loader_mode(String) Open WebUI settingPDF_LOADER_MODE. Stored asrag.pdf_loader_mode.rag_external_reranker_api_key(String, Sensitive) Open WebUI settingRAG_EXTERNAL_RERANKER_API_KEY. Stored asrag.external_reranker_api_key. Sensitive.rag_external_reranker_timeout(String) Open WebUI settingRAG_EXTERNAL_RERANKER_TIMEOUT. Stored asrag.external_reranker_timeout.rag_external_reranker_url(String) Open WebUI settingRAG_EXTERNAL_RERANKER_URL. Stored asrag.external_reranker_url.rag_full_context(Boolean) Open WebUI settingRAG_FULL_CONTEXT. Stored asrag.full_context.rag_reranking_batch_size(Number) Open WebUI settingRAG_RERANKING_BATCH_SIZE. Stored asrag.reranking_batch_size.rag_reranking_engine(String) Open WebUI settingRAG_RERANKING_ENGINE. Stored asrag.reranking_engine.rag_reranking_model(String) Open WebUI settingRAG_RERANKING_MODEL. Stored asrag.reranking_model.rag_template(String) Prompt template that wraps retrieved context. Stored asrag.template.rag_tokenizer_model(String) Open WebUI settingRAG_TOKENIZER_MODEL. Stored asrag.tokenizer_model.relevance_threshold(Number) Open WebUI settingRELEVANCE_THRESHOLD. Stored asrag.relevance_threshold.text_splitter(String) Open WebUI settingTEXT_SPLITTER. Stored asrag.text_splitter.tika_server_url(String) Open WebUI settingTIKA_SERVER_URL. Stored asrag.tika_server_url.top_k(Number) Open WebUI settingTOP_K. Stored asrag.top_k.top_k_reranker(Number) Open WebUI settingTOP_K_RERANKER. Stored asrag.top_k_reranker.web(Attributes) Web search and web loader settings. Open WebUI writes every key of this block on every write. (see below for nested schema)
Read-Only
id(String) Identifier of this singleton resource. Alwaysrag.
Nested Schema for web
Optional:
bing_search_v7_endpoint(String) Open WebUI settingBING_SEARCH_V7_ENDPOINT. Stored asweb.search.bing_search_v7_endpoint.bing_search_v7_subscription_key(String, Sensitive) Open WebUI settingBING_SEARCH_V7_SUBSCRIPTION_KEY. Stored asweb.search.bing_search_v7_subscription_key. Sensitive.bocha_search_api_key(String, Sensitive) Open WebUI settingBOCHA_SEARCH_API_KEY. Stored asweb.search.bocha_search_api_key. Sensitive.brave_search_api_key(String, Sensitive) Open WebUI settingBRAVE_SEARCH_API_KEY. Stored asweb.search.brave_search_api_key. Sensitive.brave_search_context_tokens(Number) Open WebUI settingBRAVE_SEARCH_CONTEXT_TOKENS. Stored asweb.search.brave_search_context_tokens.bypass_web_search_embedding_and_retrieval(Boolean) Open WebUI settingBYPASS_WEB_SEARCH_EMBEDDING_AND_RETRIEVAL. Stored asweb.search.bypass_embedding_and_retrieval.bypass_web_search_web_loader(Boolean) Open WebUI settingBYPASS_WEB_SEARCH_WEB_LOADER. Stored asweb.search.bypass_web_loader.ddgs_backend(String) Open WebUI settingDDGS_BACKEND. Stored asweb.search.ddgs_backend.enable_web_loader_ssl_verification(Boolean) Open WebUI settingENABLE_WEB_LOADER_SSL_VERIFICATION. Stored asweb.loader.ssl_verification.enable_web_search(Boolean) Open WebUI settingENABLE_WEB_SEARCH. Stored asweb.search.enable.enable_web_search_confirmation(Boolean) Open WebUI settingENABLE_WEB_SEARCH_CONFIRMATION. Stored asweb.search.confirmation.enable.exa_api_key(String, Sensitive) Open WebUI settingEXA_API_KEY. Stored asweb.search.exa_api_key. Sensitive.external_web_loader_api_key(String, Sensitive) Open WebUI settingEXTERNAL_WEB_LOADER_API_KEY. Stored asweb.loader.external_web_loader_api_key. Sensitive.external_web_loader_url(String) Open WebUI settingEXTERNAL_WEB_LOADER_URL. Stored asweb.loader.external_web_loader_url.external_web_search_api_key(String, Sensitive) Open WebUI settingEXTERNAL_WEB_SEARCH_API_KEY. Stored asweb.search.external_web_search_api_key. Sensitive.external_web_search_url(String) Open WebUI settingEXTERNAL_WEB_SEARCH_URL. Stored asweb.search.external_web_search_url.firecrawl_api_base_url(String) Open WebUI settingFIRECRAWL_API_BASE_URL. Stored asweb.loader.firecrawl_api_url.firecrawl_api_key(String, Sensitive) Open WebUI settingFIRECRAWL_API_KEY. Stored asweb.loader.firecrawl_api_key. Sensitive.firecrawl_timeout(String) Open WebUI settingFIRECRAWL_TIMEOUT. Stored asweb.loader.firecrawl_timeout.google_pse_api_key(String, Sensitive) Open WebUI settingGOOGLE_PSE_API_KEY. Stored asweb.search.google_pse_api_key. Sensitive.google_pse_engine_id(String) Open WebUI settingGOOGLE_PSE_ENGINE_ID. Stored asweb.search.google_pse_engine_id.jina_api_base_url(String) Open WebUI settingJINA_API_BASE_URL. Stored asweb.search.jina_api_base_url.jina_api_key(String, Sensitive) Open WebUI settingJINA_API_KEY. Stored asweb.search.jina_api_key. Sensitive.kagi_search_api_key(String, Sensitive) Open WebUI settingKAGI_SEARCH_API_KEY. Stored asweb.search.kagi_search_api_key. Sensitive.linkup_api_key(String, Sensitive) Open WebUI settingLINKUP_API_KEY. Stored asweb.search.linkup_api_key. Sensitive.linkup_search_params(String) JSON object of extra parameters passed to Linkup. Stored asweb.search.linkup_search_params.microsoft_web_iq_api_base_url(String) Open WebUI settingMICROSOFT_WEB_IQ_API_BASE_URL. Stored asweb.search.microsoft_web_iq_api_base_url.microsoft_web_iq_api_key(String, Sensitive) Open WebUI settingMICROSOFT_WEB_IQ_API_KEY. Stored asweb.search.microsoft_web_iq_api_key. Sensitive.microsoft_web_iq_language(String) Open WebUI settingMICROSOFT_WEB_IQ_LANGUAGE. Stored asweb.search.microsoft_web_iq_language.mojeek_search_api_key(String, Sensitive) Open WebUI settingMOJEEK_SEARCH_API_KEY. Stored asweb.search.mojeek_search_api_key. Sensitive.ollama_cloud_web_search_api_key(String, Sensitive) Open WebUI settingOLLAMA_CLOUD_WEB_SEARCH_API_KEY. Stored asweb.search.ollama_cloud_api_key. Sensitive.openserp_base_url(String) Open WebUI settingOPENSERP_BASE_URL. Stored asweb.search.openserp_base_url.perplexity_api_key(String, Sensitive) Open WebUI settingPERPLEXITY_API_KEY. Stored asweb.search.perplexity_api_key. Sensitive.perplexity_model(String) Open WebUI settingPERPLEXITY_MODEL. Stored asweb.search.perplexity_model.perplexity_search_api_url(String) Open WebUI settingPERPLEXITY_SEARCH_API_URL. Stored asweb.search.perplexity_search_api_url.perplexity_search_context_usage(String) Open WebUI settingPERPLEXITY_SEARCH_CONTEXT_USAGE. Stored asweb.search.perplexity_search_context_usage.playwright_timeout(Number) Open WebUI settingPLAYWRIGHT_TIMEOUT. Stored asweb.loader.playwright_timeout.playwright_ws_url(String) Open WebUI settingPLAYWRIGHT_WS_URL. Stored asweb.loader.playwright_ws_url.searchapi_api_key(String, Sensitive) Open WebUI settingSEARCHAPI_API_KEY. Stored asweb.search.searchapi_api_key. Sensitive.searchapi_engine(String) Open WebUI settingSEARCHAPI_ENGINE. Stored asweb.search.searchapi_engine.searxng_language(String) Open WebUI settingSEARXNG_LANGUAGE. Stored asweb.search.searxng_language.searxng_query_url(String) Open WebUI settingSEARXNG_QUERY_URL. Stored asweb.search.searxng_query_url.serpapi_api_key(String, Sensitive) Open WebUI settingSERPAPI_API_KEY. Stored asweb.search.serpapi_api_key. Sensitive.serpapi_engine(String) Open WebUI settingSERPAPI_ENGINE. Stored asweb.search.serpapi_engine.serper_api_key(String, Sensitive) Open WebUI settingSERPER_API_KEY. Stored asweb.search.serper_api_key. Sensitive.serphouse_api_key(String, Sensitive) Open WebUI settingSERPHOUSE_API_KEY. Stored asweb.search.serphouse_api_key. Sensitive.serphouse_domain(String) Open WebUI settingSERPHOUSE_DOMAIN. Stored asweb.search.serphouse_domain.serply_api_key(String, Sensitive) Open WebUI settingSERPLY_API_KEY. Stored asweb.search.serply_api_key. Sensitive.serpstack_api_key(String, Sensitive) Open WebUI settingSERPSTACK_API_KEY. Stored asweb.search.serpstack_api_key. Sensitive.serpstack_https(Boolean) Open WebUI settingSERPSTACK_HTTPS. Stored asweb.search.serpstack_https.sougou_api_sid(String) Open WebUI settingSOUGOU_API_SID. Stored asweb.search.sougou_api_sid.sougou_api_sk(String, Sensitive) Open WebUI settingSOUGOU_API_SK. Stored asweb.search.sougou_api_sk. Sensitive.tavily_api_key(String, Sensitive) Open WebUI settingTAVILY_API_KEY. Stored asweb.search.tavily_api_key. Sensitive.tavily_extract_depth(String) Open WebUI settingTAVILY_EXTRACT_DEPTH. Stored asweb.search.tavily_extract_depth.web_fetch_max_content_length(Number) Open WebUI settingWEB_FETCH_MAX_CONTENT_LENGTH. Stored asweb.fetch.max_content_length.web_loader_concurrent_requests(Number) Open WebUI settingWEB_LOADER_CONCURRENT_REQUESTS. Stored asweb.loader.concurrent_requests.web_loader_engine(String) Open WebUI settingWEB_LOADER_ENGINE. Stored asweb.loader.engine.web_loader_timeout(String) Open WebUI settingWEB_LOADER_TIMEOUT. Stored asweb.loader.timeout.web_search_concurrent_requests(Number) Open WebUI settingWEB_SEARCH_CONCURRENT_REQUESTS. Stored asweb.search.concurrent_requests.web_search_confirmation_content(String) Open WebUI settingWEB_SEARCH_CONFIRMATION_CONTENT. Stored asweb.search.confirmation.content.web_search_domain_filter_list(List of String) Domains web search results are restricted to. Stored asweb.search.domain.filter_list.web_search_engine(String) Open WebUI settingWEB_SEARCH_ENGINE. Stored asweb.search.engine.web_search_result_count(Number) Open WebUI settingWEB_SEARCH_RESULT_COUNT. Stored asweb.search.result_count.web_search_trust_env(Boolean) Open WebUI settingWEB_SEARCH_TRUST_ENV. Stored asweb.search.trust_env.yacy_password(String, Sensitive) Open WebUI settingYACY_PASSWORD. Stored asweb.search.yacy_password. Sensitive.yacy_query_url(String) Open WebUI settingYACY_QUERY_URL. Stored asweb.search.yacy_query_url.yacy_username(String) Open WebUI settingYACY_USERNAME. Stored asweb.search.yacy_username.yandex_web_search_api_key(String, Sensitive) Open WebUI settingYANDEX_WEB_SEARCH_API_KEY. Stored asweb.search.yandex_web_search_api_key. Sensitive.yandex_web_search_config(String) Open WebUI settingYANDEX_WEB_SEARCH_CONFIG. Stored asweb.search.yandex_web_search_config.yandex_web_search_url(String) Open WebUI settingYANDEX_WEB_SEARCH_URL. Stored asweb.search.yandex_web_search_url.youcom_api_key(String, Sensitive) Open WebUI settingYOUCOM_API_KEY. Stored asweb.search.youcom_api_key. Sensitive.youtube_loader_language(List of String) Open WebUI settingYOUTUBE_LOADER_LANGUAGE. Stored asrag.youtube_loader_language.youtube_loader_proxy_url(String) Open WebUI settingYOUTUBE_LOADER_PROXY_URL. Stored asrag.youtube_loader_proxy_url.
Import
Import is supported using the following syntax:
The terraform import command can be used, for example:
# Open WebUI holds one RAG configuration, so this resource is a singleton.
# Import it under its fixed id.
terraform import openwebui_rag_config.example 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.