Repository navigation
fix(plugin): seed the catalog context window instead of the 128k fallback - #8
Merged
Merged
Conversation
bun build writes `// <module path>` above every inlined module, and the path depends on the install: a bun workspace shows `node_modules/zod/...` while CI shows `../node_modules/.bun/zod@4.1.8/node_modules/zod/...`. The code is byte-identical, but verify-release.ts hashes the tarball, so a healthy publish read as "served bytes do not match the local pack — do not install". The build now drops those comments, which also stops the bundle leaking an install path.
…back staticSeedModels passed contextLength 0 for every model, so toV2Model fell back to DEFAULT_CONTEXT_LENGTH (128k) and a 1M-context model compacted at a fifth of its real window until the live list arrived. Seed from the catalog through a new modelContext accessor; an unknown or 0 context keeps the fallback. Bumps to 0.5.24.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
JeffreyJYZ
approved these changes
Nov 8, 2026
This branch was successfully deployed
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.
Problem
A 1M-context model reported a 128k window, so the host compacted at roughly 81k. Measured on
command-code-openai/deepseek/deepseek-v4.1-flash:{"id":"deepseek/deepseek-v4.1-flash","contextLength":1000000}src/catalog.ts:context: 1000000context_breakdown:limit.context = 128000Cause
staticSeedModels()seeded every model withcontextLength: 0, andtoV2Modelturns0intoDEFAULT_CONTEXT_LENGTH(128_000). The seed is what the host registers before the live list merges, so the fallback won whenever the session bound to a seeded entry. The catalog already held the real figure but exposed no accessor for it.Fix
catalog.ts: newmodelContext(id)accessor, matching the existingmodelCost/minPlanshape.v2.ts: the seed passesmodelContext(id) ?? 0intotoV2Model.0keeps meaning "unknown": a catalogued0or an unlisted id still falls back toDEFAULT_CONTEXT_LENGTH.modelContextfor a known and an unknown id.0.5.24.The v1 half is untouched — it awaits the live list and never seeds.
Verification