def44338ff
Updates the canonical Anthropic Opus model in every fallback chain (sisyphus, oracle, prometheus, metis, momus, visual-engineering, ultrabrain, deep, artistry, unspecified-high), the unspecified-high category default, the think-mode HIGH_VARIANT_MAP, the Claude Code alias map, the claude-thinking legacy alias, the context-limit GA regex, and event.ts fallback strings. Widens supportsCachedAnthropicLimit to accept both claude-*-4-6 and claude-*-4-7 so the 1M context cache still applies across the bump. Regenerates the bundled model-capabilities snapshot from models.dev and the model-fallback snapshot to match the new source output.
22 lines
828 B
TypeScript
22 lines
828 B
TypeScript
import { describe, expect, test } from "bun:test"
|
|
import { readFileSync } from "node:fs"
|
|
|
|
describe("experimental.session.compacting", () => {
|
|
test("does not hardcode a model and uses output.context", () => {
|
|
//#given
|
|
const indexUrl = new URL("./index.ts", import.meta.url)
|
|
const content = readFileSync(indexUrl, "utf-8")
|
|
const hookIndex = content.indexOf('"experimental.session.compacting"')
|
|
|
|
//#when
|
|
const hookSlice = hookIndex >= 0 ? content.slice(hookIndex, hookIndex + 1200) : ""
|
|
|
|
//#then
|
|
expect(hookIndex).toBeGreaterThanOrEqual(0)
|
|
expect(content.includes('modelID: "claude-opus-4-7"')).toBe(false)
|
|
expect(hookSlice.includes("output.context.push")).toBe(true)
|
|
expect(hookSlice.includes("providerID:")).toBe(false)
|
|
expect(hookSlice.includes("modelID:")).toBe(false)
|
|
})
|
|
})
|