설정 화면: 저장된 모델이 목록에 없으면 옵션으로 추가해 선택(Anthropic/Google/OpenAI/Codex) — 설정 저장 시 모델이 옛 값으로 되돌아가던 원인 수정, Claude 5.5 옵션 추가
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
aab520648b
commit
ad06c2328a
2 files changed
+11
-8
No files matched your search
@@ -1221,9 +1221,11 @@
|
||||
<input id="settings-anthropic-key" type="password" placeholder="sk-ant-api03-..." style="width:100%;border:1px solid var(--line);border-radius:10px;padding:8px;font-size:12px;font-family:'IBM Plex Mono',monospace" />
|
||||
<label style="display:block;font-size:12px;color:var(--muted);margin:10px 0 6px">모델</label>
|
||||
<select id="settings-anthropic-model" class="settings-input" style="font-size:13px">
|
||||
<option value="claude-sonnet-4-6">claude-sonnet-4-6 (권장)</option>
|
||||
<option value="claude-opus-4-7">claude-opus-4-7</option>
|
||||
<option value="claude-haiku-4-5-20251001">claude-haiku-4-5-20251001 (빠름)</option>
|
||||
<option value="claude-haiku-5-5">claude-haiku-5-5 (권장 · 빠름 · $0.10/$0.50 per 1M)</option>
|
||||
<option value="claude-sonnet-5-5">claude-sonnet-5-5 (어려운 질문 · $2/$10)</option>
|
||||
<option value="claude-opus-5-5">claude-opus-5-5 ($4/$20)</option>
|
||||
<option value="claude-sonnet-4-6">claude-sonnet-4-6 (옛 모델)</option>
|
||||
<option value="claude-haiku-4-5-20251001">claude-haiku-4-5-20251001 (옛 모델)</option>
|
||||
</select>
|
||||
<div style="display:flex;gap:8px;margin-top:8px">
|
||||
<button class="btn btn-sm" onclick="testProviderConnection()" style="background:#fff;border:1px solid var(--line);color:var(--text)">연결 테스트</button>
|
||||
|
||||
@@ -405,9 +405,10 @@ async function loadModelSettings() {
|
||||
{ const cb = document.getElementById('settings-lmstudio-disable-thinking'); if (cb) cb.checked = pc.lm_studio?.disable_thinking !== false; }
|
||||
v('settings-openai-key', pc.openai?.api_key);
|
||||
v('settings-anthropic-key', pc.anthropic?.api_key);
|
||||
if (pc.anthropic?.model) { const s = document.getElementById('settings-anthropic-model'); if (s) s.value = pc.anthropic.model; }
|
||||
// 저장된 모델이 목록에 없으면 옵션을 추가해 선택한다 — 안 그러면 select가 첫 옵션(옛 모델)으로 보이고, 저장 시 그 값이 설정을 덮어쓴다(2026-10-17: claude-haiku-5-5가 4.5로 되돌아간 원인)
|
||||
seedModelSelect('settings-anthropic-model', pc.anthropic?.model);
|
||||
v('settings-google-key', pc.google?.api_key);
|
||||
if (pc.google?.model) { const s = document.getElementById('settings-google-model'); if (s) s.value = pc.google.model; }
|
||||
seedModelSelect('settings-google-model', pc.google?.model);
|
||||
|
||||
// Set primary model from saved config before refreshing the list
|
||||
// Fallback to data.models_primary (models.primary) when provider's model field is empty
|
||||
@@ -417,8 +418,8 @@ async function loadModelSettings() {
|
||||
if (sel) sel.value = savedPrimaryModel;
|
||||
}
|
||||
|
||||
if (pc.openai?.model) { const s = document.getElementById('settings-openai-model'); if (s) s.value = pc.openai.model; }
|
||||
if (pc.openai_codex?.model) { const s = document.getElementById('settings-codex-model'); if (s) s.value = pc.openai_codex.model; }
|
||||
seedModelSelect('settings-openai-model', pc.openai?.model);
|
||||
seedModelSelect('settings-codex-model', pc.openai_codex?.model);
|
||||
|
||||
// Check Codex OAuth status
|
||||
await refreshCodexStatus();
|
||||
@@ -575,7 +576,7 @@ function buildProviderPayload() {
|
||||
providers.lm_studio = { endpoint: document.getElementById('settings-lmstudio-endpoint')?.value || 'http://localhost:1234', model: document.getElementById('settings-lmstudio-model')?.value || '', disable_thinking: !!document.getElementById('settings-lmstudio-disable-thinking')?.checked };
|
||||
providers.openai = { api_key: document.getElementById('settings-openai-key')?.value || '', model: document.getElementById('settings-openai-model')?.value || 'gpt-4o' };
|
||||
providers.openai_codex = { model: document.getElementById('settings-codex-model')?.value || 'gpt-5.3-codex' };
|
||||
providers.anthropic = { api_key: document.getElementById('settings-anthropic-key')?.value || '', model: document.getElementById('settings-anthropic-model')?.value || 'claude-sonnet-4-6' };
|
||||
providers.anthropic = { api_key: document.getElementById('settings-anthropic-key')?.value || '', model: document.getElementById('settings-anthropic-model')?.value || 'claude-haiku-5-5' };
|
||||
providers.google = { api_key: document.getElementById('settings-google-key')?.value || '', model: document.getElementById('settings-google-model')?.value || 'gemini-3.6-flash' };
|
||||
return { provider, providers };
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user