v4.3.19-4: Google(Gemini) LLM provider 추가
- LLMProvider.ts/factory.ts: 'google' ProviderID 추가, 기존 openai_compat 어댑터를 Gemini의 OpenAI 호환 엔드포인트로 재사용(새 어댑터 클래스 없음). api_key는 resolveEnvKey가 아닌 getConfig().resolveSecret()로 해석 — vault: 참조를 실제로 못 푸는 기존 openai/anthropic 케이스의 버그를 google 케이스에서는 피해감 - config.ts: llm.providers.google 기본값 추가(기본모델 gemini-3.6-flash), SECRET_FIELD_MAP에 api_key 자동 vault 이관 등록 - 설정 화면(index.html/settings-provider.js): LLM 제공자 드롭다운에 Google 옵션 + API키/모델 선택 UI, anthropic 패턴 그대로 재사용 - openai-compat-adapter.ts: 기본 max_tokens 512→4000 — 사고형 모델 (gemini-3.6-flash)이 내부 사고 토큰에 예산을 다 써서 빈 응답 반환하는 버그 실측 후 수정(llama_cpp/lm_studio/openai/google 전부 공유하는 값) - 5문항 벤치마크로 gemini-3.6-flash/3.5-flash-lite/3.1-flash-lite 비교, secondary 후보로 3.5-flash-lite 확정(정직함 동률 최상위+5배 빠름+저가) Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1016,6 +1016,7 @@
|
||||
<option value="openai">OpenAI — API 키</option>
|
||||
<option value="openai_codex">OpenAI — GPT Plus / Codex (OAuth)</option>
|
||||
<option value="anthropic">Anthropic — Claude API 키</option>
|
||||
<option value="google">Google — Gemini API 키</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@@ -1106,6 +1107,24 @@
|
||||
<div id="provider-status-msg-anthropic" style="font-size:11px;color:var(--muted);margin-top:6px"></div>
|
||||
</div>
|
||||
|
||||
<!-- Google (Gemini) -->
|
||||
<div id="prov-fields-google" style="display:none">
|
||||
<div class="right-section-title" style="margin-bottom:8px">Google Gemini API 키</div>
|
||||
<label style="display:block;font-size:12px;color:var(--muted);margin-bottom:6px">API 키</label>
|
||||
<input id="settings-google-key" type="password" placeholder="AIzaSy... 또는 AQ...." 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-google-model" class="settings-input" style="font-size:13px">
|
||||
<option value="gemini-3.6-flash">gemini-3.6-flash (권장)</option>
|
||||
<option value="gemini-3.5-flash-lite">gemini-3.5-flash-lite (경제적, $0.30/$2.50 per 1M)</option>
|
||||
<option value="gemini-3.1-flash-lite">gemini-3.1-flash-lite (최저가, $0.25/$1.50 per 1M)</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>
|
||||
</div>
|
||||
<div id="provider-status-msg-google" style="font-size:11px;color:var(--muted);margin-top:6px"></div>
|
||||
<div style="font-size:11px;color:var(--muted);margin-top:12px;line-height:1.6">키는 <a href="https://aistudio.google.com/" target="_blank" rel="noopener">Google AI Studio</a>에서 발급받으세요.</div>
|
||||
</div>
|
||||
|
||||
<!-- OpenAI Codex OAuth -->
|
||||
<div id="prov-fields-openai_codex" style="display:none">
|
||||
<div class="right-section-title" style="margin-bottom:8px">OpenAI — GPT Plus / Codex</div>
|
||||
|
||||
Reference in New Issue
Block a user