Skip to content

release: v1.14.15 — pin nudge growth to fixed 50000 tokens - #294

Merged
ranxianglei merged 1 commit into
masterfrom
2026-08-12_release-v1.14.15
Aug 11, 2026
Merged

release: v1.14.15 — pin nudge growth to fixed 50000 tokens#294
ranxianglei merged 1 commit into
masterfrom
2026-08-12_release-v1.14.15

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

release: v1.14.15 — Pin nudge growth to fixed 50,000 tokens

Summary

Sets a fixed default compress.nudgeGrowthTokens: 50000, overriding the adaptive
5%-of-context value (clamped 20K–50K) from context-compress-algorithms.

Problem

The T2/T3 nudge growth threshold was computed as 5% of the model context window
(clamped 20K–50K via resolveAdaptiveNudgeGrowth). For sub-1M-context models this
produced smaller thresholds (e.g. 200K → 10K, 400K → 20K), causing nudges to fire
too eagerly and drive over-compression.

Change

lib/config.ts default compress block — one new line:

nudgeGrowthTokens: 50000,

This overrides the adaptive value through the existing hook at
lib/messages/inject/inject.ts:250-251:

const nudgeGrowthTokens = config.compress?.nudgeGrowthTokens ?? resolveAdaptiveNudgeGrowth(modelContextLimit)

No source-logic change. The emergencyThresholdPercent: "98%" backstop is
unchanged. Users can still override via compress.nudgeGrowthTokens in their config.

Why self-contained (not a context-compress-algorithms release)

opencode-acp imports the adaptive math from the external context-compress-algorithms
package. The ?? override hook already exists precisely for host-side overrides.
Changing it here (rather than releasing a 5th package) keeps the change visible in
opencode-acp's own config and matches the parallel change in acp-kernel v0.0.19
(which feeds billion-context and billion-context-pi). All three adapters now use
a single fixed 50,000-token growth threshold.

Verification

  • typecheck (tsc --noEmit): clean
  • tests (node --import tsx --test tests/*.test.ts): 976 pass / 0 fail
  • build (tsup && tsc --emitDeclarationOnly): success, 391.34 KB
  • scripts/ci/check-pr.sh: all checks pass (branch name, devlog, changelog)

Merge → auto-publish

Merging this PR triggers release.yml, which detects the 2026-08-12_release-v*
branch, tags v1.14.15, and publishes to npm latest. PR merge is human-only.

@ranxianglei
ranxianglei merged commit 7538f4d into master Aug 11, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant