Repository navigation
TD-5303: a chat whose model entry is gone is distilled only on this computer - #129
Merged
Merged
Conversation
…omputer TD-5259 made distill follow the chat's own entry. One case still fell back to the active entry: a chat whose entry had been removed. Checked at runtime, a chat kept on a local model (127.0.0.1) was then distilled on a hosted one. Nothing records where that chat's conversation went, so it now goes only to an entry whose roles and backups all call a server on this computer (ModelConfig.local_default), and is skipped when there is none. A chat on an entry of its own, and a Grok chat, are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
captcrock
force-pushed
the
td/5303-distill-stays-local
branch
from
November 24, 2026 16:35
dbff304 to
b0f1494
Compare
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.
Owner decision #9: memory distill follows the chat's own model, so a local chat never sends its conversation to a hosted model.
Runtime check: TD-5259 (on main) already distills a chat on the entry it is on. One case was still open. When a chat's entry had been removed, distill fell back to the active entry. On main,
test_a_chat_whose_entry_was_removed_falls_backasserted exactly this: a chat onvllm(http://127.0.0.1:8000/v1) was distilled ontst-default, which resolves tohttps://openrouter.ai/api/v1.Change: a chat whose entry is gone (or that names none) uses the new
ModelConfig.local_default(). That is the active entry if every role and every backup calls a loopback server, else the first entry that does. If there is none, distill is skipped. A chat on an entry of its own, and a Grok chat, are unchanged.Tests: in
test_distill_entry.py, the removed-entry test now expects the local entry and a 127.0.0.1 client. New tests cover the skip when nothing is local, a hosted entry of its own still being used, and a local entry with a hosted backup not counting as local. Full core suite: 9033 passed. ruff and mypy are clean. Release scan: 0 hits.🤖 Generated with Claude Code