OpenWebUI: Ollama-500 endgueltig aus (DB-Config ollama.enable=false), Model-Namen + Default-Picker

- ollama.enable=false jetzt auch in der persistierten DB-Config (DB schlaegt Env
  in v0.13.3 — sonst weiterhin HTTP 500 auf /ollama/api/version)
- Anzeigenamen: Engine "Qwen 3.8 27B (Swift 1.5)", Pipe "Deep Research" (ids bleiben stabil)
- Default im Model-Picker: ui.default_models=[engine-id] + DEFAULT_MODELS-Env
- Verifiziert: DB-Werte gesetzt, Namen korrekt, health 200, webui.yml idempotent changed=0

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
2026-11-16 01:11:45 +01:00
parent c117c4cf10
commit 773a8d2d56
3 changed files with 44 additions and 14 deletions
@@ -156,6 +156,15 @@ nach OWUI-v0.13.3 Reserved-Args (`user_prompt` lesen, History cappen).
`MAX_TOKENS`/`PAGE_TEXT_CHARS` in DB verifiziert. Hinweis: Im Pipe-Modus
sieht man das Thinking des Modells nicht (by design — die Pipe streamt nur
Status + Report); Token-Usage steht in der API-Response unter `usage`.
- **Ollama-500 trotz `ENABLE_OLLAMA_API=False` (14.11.):** in v0.13.3 schlägt
die persistierte DB-Config (`ollama.enable=true`, beim ersten Start aus dem
Env geseeded) das Env — Fix: DB-Key `ollama.enable=false` im Config-Sync.
- **Model-Namen/Default (14.11.):** `model.name` bzw. `function.name` sind
reine Anzeigenamen (id bleibt stabil für Grants/API): Engine-Modell heißt
„Qwen 3.8 27B (Swift 1.5)", die Pipe „Deep Research"; Default im Picker
über `ui.default_models=["swift-1.5-qwen3.8-27b-q6k"]` (+ `DEFAULT_MODELS`-Env).
- **Console-Warning `svelte.dev/e/derived_inert`:** kosmetisch, kommt aus
OpenWebUI v0.13.3 selbst (Upstream), kein Handlungsbedarf.
## 6. Sicherheit
@@ -27,7 +27,13 @@ open_webui_egress_network_name: gnai-production-egress
# Engine model exposed in the chat UI. The model is synced into the OpenWebUI
# DB and granted public read access (access_grant principal user "*"), so
# every authenticated OIDC user sees it (GNAI-005: anwendungsbezogene Rechte).
# The id stays stable (grants, API callers); the display name is cosmetic.
open_webui_engine_model_id: swift-1.5-qwen3.8-27b-q6k
open_webui_engine_model_name: "Qwen 3.8 27B (Swift 1.5)"
# Default model preselected in the model picker of new chats (v0.13:
# ui.default_models in the DB config wins over the env var).
open_webui_default_models:
- "{{ open_webui_engine_model_id }}"
# Workspace tool (API agents): SearXNG wrapper seeded into the OpenWebUI DB
# with a public read grant. API callers pass this id in `tool_ids`.
@@ -39,6 +45,7 @@ open_webui_web_search_tool_id: gnai-web-search
# sha256 (recompute after every edit of files/gnai-deep-research-pipe.py:
# sha256sum files/gnai-deep-research-pipe.py).
open_webui_deep_research_function_id: gnai-deep-research
open_webui_deep_research_display_name: "Deep Research"
open_webui_deep_research_pipe_sha256: "45cb3be0029937fdde7d70018d63191101fba8151dcf55e5566c464584b54c9b"
open_webui_deep_research_valves:
ENGINE_BASE_URL: "{{ open_webui_engine_base_url }}"
@@ -119,7 +126,10 @@ open_webui_env:
WEB_SEARCH_ENGINE: searxng
# No Ollama on this host: without this the UI calls /ollama/api/version on
# every model-list open and surfaces HTTP 500 "could not connect to Ollama".
# NOTE: the persisted DB config (ollama.enable) wins over this env var, so
# the DB sync task below also sets ollama.enable=false.
ENABLE_OLLAMA_API: "False"
DEFAULT_MODELS: "{{ open_webui_engine_model_id }}"
# v0.13.3 strips any query string from the URL and sends q/format=json
# itself (retrieval/web/searxng.py), so the <query> placeholder form is
# correct.
@@ -247,23 +247,26 @@
# params stay empty. Idempotent; touches only the app DB, no secrets.
ansible.builtin.shell: |
set -euo pipefail
python3 - "{{ open_webui_data_dir }}/webui.db" "{{ open_webui_engine_model_id }}" <<'PYEOF'
python3 - "{{ open_webui_data_dir }}/webui.db" "{{ open_webui_engine_model_id }}" "{{ open_webui_engine_model_name }}" <<'PYEOF'
import json, sqlite3, sys, time, uuid
db, model_id = sys.argv[1], sys.argv[2]
db, model_id, model_name = sys.argv[1], sys.argv[2], sys.argv[3]
con = sqlite3.connect(db)
now = int(time.time())
changed = False
row = con.execute("select id, meta from model where id=?", (model_id,)).fetchone()
row = con.execute("select id, name, meta from model where id=?", (model_id,)).fetchone()
if not row:
con.execute(
"insert into model (id, user_id, base_model_id, name, params, meta, is_active, version_id, created_at, updated_at)"
" values (?,?,?,?,?,?,?,?,?,?)",
(model_id, "openwebui", None, model_id, "{}", "{}", 1, str(uuid.uuid4()), now, now),
(model_id, "openwebui", None, model_name, "{}", "{}", 1, str(uuid.uuid4()), now, now),
)
changed = True
meta = {}
else:
meta = json.loads(row[1] or "{}")
meta = json.loads(row[2] or "{}")
if row[1] != model_name:
con.execute("update model set name=?, updated_at=? where id=?", (model_name, now, model_id))
changed = True
caps = meta.get("capabilities") or {}
builtin = meta.get("builtinTools") or {}
meta["capabilities"] = caps
@@ -340,6 +343,12 @@
web.search.result_count: "{{ open_webui_env.WEB_SEARCH_RESULT_COUNT | int }}"
web.search.concurrent_requests: "{{ open_webui_env.WEB_SEARCH_CONCURRENT_REQUESTS | int }}"
web.fetch.max_content_length: "{{ open_webui_env.WEB_FETCH_MAX_CONTENT_LENGTH | int }}"
# DB config wins over env in v0.13: without ollama.enable=false the UI
# still calls /ollama/api/version on every model-list open (HTTP 500,
# no Ollama on this host). ui.default_models preselects the engine model
# in new chats.
ollama.enable: false
ui.default_models: "{{ open_webui_default_models }}"
when: not ansible_check_mode
register: open_webui_web_config_sync
changed_when: open_webui_web_config_sync.stdout_lines | first == 'CHANGED'
@@ -476,21 +485,22 @@
python3 - "{{ open_webui_data_dir }}/webui.db" \
/tmp/gnai-deep-research-pipe.py \
'{{ open_webui_deep_research_valves | to_json }}' \
"{{ open_webui_deep_research_function_id }}" <<'PYEOF'
"{{ open_webui_deep_research_function_id }}" \
"{{ open_webui_deep_research_display_name }}" <<'PYEOF'
import json, sqlite3, sys, time, uuid
db, content_path, valves_raw, fn_id = sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4]
db, content_path, valves_raw, fn_id, fn_name = sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5]
content = open(content_path).read()
valves = json.loads(valves_raw)
meta = json.dumps({"description": "Iterativer Deep-Research-Loop (plan -> SearXNG -> fetch -> Synthese) auf der Production-Engine. GNAI-022 / GNAI-001 M6-R1."})
now = int(time.time())
con = sqlite3.connect(db)
changed = False
row = con.execute("select content, valves, meta, type, is_active, is_global from function where id=?", (fn_id,)).fetchone()
row = con.execute("select content, valves, meta, type, is_active, is_global, name from function where id=?", (fn_id,)).fetchone()
if not row:
con.execute(
"insert into function (id, version_id, user_id, name, type, content, meta, valves, is_active, is_global, updated_at, created_at)"
" values (?,?,?,?,?,?,?,?,?,?,?,?)",
(fn_id, str(uuid.uuid4()), "openwebui", "gnai-deep-research", "pipe", content, meta, json.dumps(valves), 1, 0, now, now),
(fn_id, str(uuid.uuid4()), "openwebui", fn_name, "pipe", content, meta, json.dumps(valves), 1, 0, now, now),
)
changed = True
elif (
@@ -500,10 +510,11 @@
or row[3] != "pipe"
or row[4] != 1
or row[5] != 0
or row[6] != fn_name
):
con.execute(
"update function set content=?, valves=?, meta=?, type='pipe', is_active=1, is_global=0, updated_at=?, version_id=? where id=?",
(content, json.dumps(valves), meta, now, str(uuid.uuid4()), fn_id),
"update function set content=?, valves=?, meta=?, type='pipe', is_active=1, is_global=0, name=?, updated_at=?, version_id=? where id=?",
(content, json.dumps(valves), meta, fn_name, now, str(uuid.uuid4()), fn_id),
)
changed = True
grant = con.execute(
@@ -526,13 +537,13 @@
con.execute(
"insert into model (id, user_id, base_model_id, name, params, meta, is_active, version_id, created_at, updated_at)"
" values (?,?,?,?,?,?,?,?,?,?)",
(fn_id, "openwebui", None, "Deep Research (gnai)", "{}", model_meta, 1, str(uuid.uuid4()), now, now),
(fn_id, "openwebui", None, fn_name, "{}", model_meta, 1, str(uuid.uuid4()), now, now),
)
changed = True
elif mrow[0] != "Deep Research (gnai)" or mrow[1] != model_meta or mrow[2] != 1:
elif mrow[0] != fn_name or mrow[1] != model_meta or mrow[2] != 1:
con.execute(
"update model set name=?, meta=?, is_active=1, updated_at=? where id=?",
("Deep Research (gnai)", model_meta, now, fn_id),
(fn_name, model_meta, now, fn_id),
)
changed = True
con.commit()