Set the search summary model from the settings panel
Summarizing web search results falls back to DEFAULT_MODEL, so a local Ollama model ends up doing it and the call can fail — which surfaces only as "保存できる要約なし" in the chat. Make SEARCH_SUMMARY_MODEL settable at runtime: add it to the settings allowlist and read it from os.environ on each call (knowledge._summary_model), the way LOCAL_KB_EMBEDDING_MODEL already works. Importing it as a config constant would keep the old value until a restart. Show the current value of the settings that are not secrets. A model name rendered as ••••qwen3 gives no way to tell what is in effect, so the store now marks those keys (NON_SECRET_KEYS) and returns them unmasked; the API field is renamed masked -> display_value and carries a secret flag that the panel uses to pick the input type, replacing the list it kept on its own side. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -46,11 +46,9 @@ const KEY_LABELS: Record<string, string> = {
|
||||
OLLAMA_API_BASE: 'Ollama API Base URL',
|
||||
TAVILY_API_KEY: 'Tavily APIキー',
|
||||
LOCAL_KB_EMBEDDING_MODEL: '埋め込みモデル(ローカルナレッジベース検索用)',
|
||||
SEARCH_SUMMARY_MODEL: '要約モデル(Web検索結果のまとめ用)',
|
||||
}
|
||||
|
||||
// 秘匿情報ではないため、マスクせず通常のテキスト入力として表示するキー
|
||||
const PLAIN_TEXT_KEYS = new Set(['LOCAL_KB_EMBEDDING_MODEL', 'OLLAMA_API_BASE', 'AWS_REGION_NAME'])
|
||||
|
||||
async function submitPassword() {
|
||||
const ok = await store.unlock(passwordInput.value)
|
||||
if (ok) passwordInput.value = ''
|
||||
@@ -106,8 +104,8 @@ onMounted(() => {
|
||||
<div class="row">
|
||||
<input
|
||||
v-model="drafts[entry.key]"
|
||||
:type="PLAIN_TEXT_KEYS.has(entry.key) ? 'text' : 'password'"
|
||||
:placeholder="entry.is_set ? `設定済み ${entry.masked}` : '未設定'"
|
||||
:type="entry.secret ? 'password' : 'text'"
|
||||
:placeholder="entry.is_set ? `現在: ${entry.display_value}` : '未設定'"
|
||||
autocomplete="off"
|
||||
/>
|
||||
<button
|
||||
|
||||
Reference in New Issue
Block a user