From 042768f067d7acaf570aaa2ff601ecfc3cf7a266 Mon Sep 17 00:00:00 2001 From: kim Date: Tue, 20 Oct 2026 16:43:35 +0900 Subject: [PATCH] =?UTF-8?q?=EC=84=B8=EC=85=98=20=EC=BB=A8=ED=85=8D?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=EC=B0=BD=20=EC=B6=94=EC=A0=95:=20Anthropi?= =?UTF-8?q?c=EC=9D=80=20200K=EB=A1=9C(8192=20=ED=8F=B4=EB=B0=B1=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=ED=86=A0=ED=81=B0=20=EC=82=AC=EC=9A=A9=EB=A5=A0?= =?UTF-8?q?=EC=9D=B4=20100%=EB=A5=BC=20=EB=84=98=EA=B2=8C=20=EB=9C=A8?= =?UTF-8?q?=EB=8D=98=20=ED=97=88=EC=88=98=20=EC=88=98=EC=A0=95)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 --- src/gateway/session.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) 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();