컨텍스트 기준: Haiku 5.5는 100K(프롬프트 100K 초과 시 5배 단가 경계)로 게이지·압축 기준 설정

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
kimandClaude Sonnet 5.5 committed 2026-10-21 10:55:43 +09:00
1 parent 4597575e4e
commit ca2d5d23e4
1 file changed
+4 -1
+4 -1
View File
@@ -212,10 +212,13 @@ export function resolveNumCtx(): number {
// 3b. Anthropic(Claude): Ollama의 /api/show가 모르는 모델이라 아래 단계를 모두 놓치고 8192로 떨어져, 세션 패널이 // 3b. Anthropic(Claude): Ollama의 /api/show가 모르는 모델이라 아래 단계를 모두 놓치고 8192로 떨어져, 세션 패널이
// 156%·419% 같은 허수를 띄웠다(2026-10-20, 기본 모델을 Haiku 5.5로 옮긴 뒤). 보수적으로 200K로 본다. // 156%·419% 같은 허수를 띄웠다(2026-10-20, 기본 모델을 Haiku 5.5로 옮긴 뒤). 보수적으로 200K로 본다.
// Haiku 5.5는 창이 1M이지만 한 요청의 프롬프트가 100K를 넘으면 그 요청 전체가 입력·출력 5배 단가(공식 가격표)라,
// 게이지·압축(compactionThreshold 0.7 → 약 70K)·기록 자르기의 기준을 창이 아닌 그 단가 경계 100K로 둔다.
try { try {
const cfg: any = getConfig().getConfig(); const cfg: any = getConfig().getConfig();
if (String(cfg?.llm?.provider || '') === 'anthropic') { if (String(cfg?.llm?.provider || '') === 'anthropic') {
_cachedNumCtx = 200000; const m = String(cfg?.llm?.providers?.anthropic?.model || cfg?.models?.primary || '');
_cachedNumCtx = /haiku-5-5/i.test(m) ? 100000 : 200000;
return _cachedNumCtx; return _cachedNumCtx;
} }
} catch { /* fall through */ } } catch { /* fall through */ }