Repository navigation
Keep a local context window's sources apart and refuse one above the advertised maximum (#380) - #462
Merged
Merged
Conversation
…advertised maximum (#380) AC6: the window a local child runs with is the person's explicit setting, never a cloud default. LocalModelDiscovery now keeps each listed model's advertised context by connection revision (typed models, failed listings and edited connections record nothing). LocalExecution refuses a window above a known advertised maximum before spawning, and its admitted provenance records configured, effective, advertised (or not-checked) and an unknown loaded size. Regressions in the execution and discovery suites; disabling each of the four guards in the compiled output made its regression fail. Docs: local-models.md, status.md and a dated review record. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Oct 31, 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.
LM-5 (#380), AC6: context-window evidence.
mainstill doesn't constructLocalExecution, so product behaviour is unchanged. This PR is independent of #461 and touches different code.What changes
The window a local child runs with was already the person's explicit
localContextTokens, never a cloud default. This PR keeps each of its sources apart:LocalModelDiscovery.advertisedContext(model). Main's record of what the runtime's last ready listing advertised for each model, by connection revision, withcheckedAt. It counts Ollama'scontext_length, LM Studio'smax_context_lengthand a/v1/modelsmax_model_len.LocalExecution. A new optional constructor parameter reads that record.validaterefuses a window above a known advertised maximum, before any process starts.context: { configured, source: "person", effective, advertised | "not-checked", loaded: "unknown" }.loadedstays unknown.Wiring discovery's record into a constructed
LocalExecutioncomes with product admission, which is Val's decision.Tests
New regressions in
local-model-execution.test.tsandlocal-model-discovery.test.ts. Disabling each of the four guards in the compiled output made its regression fail:context;Both passed again after a byte-for-byte restore.
pnpm build && pnpm test(head5ea3f19)No UI changes.
Docs:
docs/local-models.md,docs/status.mdand the review record.Still open on #380:
🤖 Generated with Claude Code