diff --git a/src/gateway/session.ts b/src/gateway/session.ts index 0ad54f2..9eb5e8b 100644 --- a/src/gateway/session.ts +++ b/src/gateway/session.ts @@ -210,6 +210,16 @@ export function resolveNumCtx(): number { } } catch { /* fall through */ } + // 3b. Anthropic(Claude): Ollama의 /api/show가 모르는 모델이라 아래 단계를 모두 놓치고 8192로 떨어져, 세션 패널이 + // 156%·419% 같은 허수를 띄웠다(2026-10-20, 기본 모델을 Haiku 5.5로 옮긴 뒤). 보수적으로 200K로 본다. + try { + const cfg: any = getConfig().getConfig(); + if (String(cfg?.llm?.provider || '') === 'anthropic') { + _cachedNumCtx = 200000; + return _cachedNumCtx; + } + } catch { /* fall through */ } + // 4. Query Ollama for the active model's actual context_length try { const cfg: any = getConfig().getConfig();