Repository navigation
Raise unknown-model context assumption to 500k - #7
Merged
Merged
Conversation
qduc
marked this pull request as ready for review
November 11, 2026 09:39
This was referenced Nov 11, 2026
qduc
added a commit
that referenced
this pull request
Nov 11, 2026
This reverts commit c69dde5. 500,000 tokens is Term2's choice for models it cannot size, so it does not belong in the shared core. The core keeps its previous value while the host-supplied assumption is designed; Term2 continues to apply its own value in the meantime. Claude-Session: https://claude.ai/code/session_01JqbJBBoCXgqyyFZaYn5Co4 Co-authored-by: Claude <noreply@anthropic.com>
qduc
added a commit
that referenced
this pull request
Nov 11, 2026
Carries the two changes merged since alpha.2: the 500,000-token unknown-model context assumption (#7) and cache-creation usage with whole-request price tiers (#8). Term2 currently applies both as a pnpm patch over alpha.2; publishing this version lets it pin the release and drop the patch. Claude-Session: https://claude.ai/code/session_01JqbJBBoCXgqyyFZaYn5Co4 Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unknown models currently schedule automatic compaction using a 128,000-token assumption. Raise the shared
DEFAULT_ASSUMED_CONTEXT_WINDOWto 500,000 so consumers and the core's conservative compaction path use the same value.Known catalogue capacities and explicit host input ceilings remain authoritative. This remains a scheduling assumption, not evidence of provider capacity or a hard admission limit.
Validation: core package build/pack and typecheck passed. No-network before/after probes exercised the actual built compaction scheduler: an unknown model stays below the maintenance threshold at 399,999 measured tokens and reaches it at 400,000 with ratio 0.8. Independent checks also verified ratio 0.5, known 128K/256K capacities, explicit input/raw-trigger overrides, invalid settings, unsettled tools and admission beyond the unknown assumption.
Consumer integration: Term2 #248 temporarily patches the existing published prerelease using the exact owner-built constant/declaration, pending a future published version containing this source change. The package build artifact is verification-only; neither PR publishes or vendors a new core version.
No npm publication, version release, merge, or live-model call is included.