test(hooks): update preemptive-compaction token thresholds for GA 1M context

Raise test token counts from 170K/180K to 800K/810K so compaction triggers at 78% of 1M instead of 78% of 200K, matching the actual GA context limit for 4.6 models.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-05-18 13:36:17 +09:00
parent b9a8ffec51
commit 35df911919
2 changed files with 14 additions and 14 deletions
@@ -42,7 +42,7 @@ describe("preemptive-compaction aws-bedrock-anthropic", () => {
modelID: "claude-sonnet-4-6",
finish: true,
tokens: {
input: 170000,
input: 800000,
output: 1000,
reasoning: 0,
cache: { read: 10000, write: 0 },
+13 -13
View File
@@ -142,7 +142,7 @@ describe("preemptive-compaction", () => {
const hook = createPreemptiveCompactionHook(ctx as never, {} as never)
const sessionID = "ses_high"
// 170K input + 10K cache = 180K → 90% of 200K
// 800K input + 10K cache = 810K → 81% of 1M (GA limit for 4.6 models)
await hook.event({
event: {
type: "message.updated",
@@ -154,7 +154,7 @@ describe("preemptive-compaction", () => {
modelID: "claude-sonnet-4-6",
finish: true,
tokens: {
input: 170000,
input: 800000,
output: 1000,
reasoning: 0,
cache: { read: 10000, write: 0 },
@@ -190,7 +190,7 @@ describe("preemptive-compaction", () => {
modelID: "claude-sonnet-4-6",
finish: true,
tokens: {
input: 170000,
input: 800000,
output: 1000,
reasoning: 0,
cache: { read: 10000, write: 0 },
@@ -267,7 +267,7 @@ describe("preemptive-compaction", () => {
modelID: "claude-sonnet-4-6",
finish: true,
tokens: {
input: 170000,
input: 800000,
output: 0,
reasoning: 0,
cache: { read: 10000, write: 0 },
@@ -313,7 +313,7 @@ describe("preemptive-compaction", () => {
modelID: "claude-sonnet-4-6",
finish: true,
tokens: {
input: 170000,
input: 800000,
output: 0,
reasoning: 0,
cache: { read: 10000, write: 0 },
@@ -357,7 +357,7 @@ describe("preemptive-compaction", () => {
modelID: "claude-sonnet-4-6",
finish: true,
tokens: {
input: 170000,
input: 800000,
output: 0,
reasoning: 0,
cache: { read: 10000, write: 0 },
@@ -386,7 +386,7 @@ describe("preemptive-compaction", () => {
modelID: "claude-sonnet-4-6",
finish: true,
tokens: {
input: 170000,
input: 800000,
output: 0,
reasoning: 0,
cache: { read: 10000, write: 0 },
@@ -504,7 +504,7 @@ describe("preemptive-compaction", () => {
modelID: "claude-sonnet-4-6",
finish: true,
tokens: {
input: 170000,
input: 800000,
output: 0,
reasoning: 0,
cache: { read: 10000, write: 0 },
@@ -544,7 +544,7 @@ describe("preemptive-compaction", () => {
modelID: "claude-sonnet-4-6",
finish: true,
tokens: {
input: 170000,
input: 800000,
output: 0,
reasoning: 0,
cache: { read: 10000, write: 0 },
@@ -576,7 +576,7 @@ describe("preemptive-compaction", () => {
const hook = createPreemptiveCompactionHook(ctx as never, {} as never)
const sessionID = "ses_recompact"
// given - first compaction cycle
// given - first compaction cycle (810K > 78% of 1M GA limit)
await hook.event({
event: {
type: "message.updated",
@@ -588,7 +588,7 @@ describe("preemptive-compaction", () => {
modelID: "claude-sonnet-4-6",
finish: true,
tokens: {
input: 170000,
input: 800000,
output: 0,
reasoning: 0,
cache: { read: 10000, write: 0 },
@@ -619,7 +619,7 @@ describe("preemptive-compaction", () => {
modelID: "claude-sonnet-4-6",
finish: true,
tokens: {
input: 170000,
input: 800000,
output: 0,
reasoning: 0,
cache: { read: 10000, write: 0 },
@@ -657,7 +657,7 @@ describe("preemptive-compaction", () => {
modelID: "claude-sonnet-4-6",
finish: true,
tokens: {
input: 170000,
input: 800000,
output: 0,
reasoning: 0,
cache: { read: 10000, write: 0 },