fix: read anthropic 1m flag from live model cache state
This commit is contained in:
@@ -249,7 +249,9 @@ describe("context-window-monitor", () => {
|
||||
|
||||
it("should use 1M limit when model cache flag is enabled", async () => {
|
||||
//#given
|
||||
const hook = createContextWindowMonitorHook(ctx as never, true)
|
||||
const hook = createContextWindowMonitorHook(ctx as never, {
|
||||
anthropicContext1MEnabled: true,
|
||||
})
|
||||
const sessionID = "ses_1m_flag"
|
||||
|
||||
await hook.event({
|
||||
@@ -286,7 +288,9 @@ describe("context-window-monitor", () => {
|
||||
it("should keep env var fallback when model cache flag is disabled", async () => {
|
||||
//#given
|
||||
process.env[ANTHROPIC_CONTEXT_ENV_KEY] = "true"
|
||||
const hook = createContextWindowMonitorHook(ctx as never, false)
|
||||
const hook = createContextWindowMonitorHook(ctx as never, {
|
||||
anthropicContext1MEnabled: false,
|
||||
})
|
||||
const sessionID = "ses_env_fallback"
|
||||
|
||||
await hook.event({
|
||||
|
||||
Reference in New Issue
Block a user