Skip to content

TD-5303: a chat whose model entry is gone is distilled only on this computer - #129

Merged
captcrock merged 1 commit into
mainfrom
td/5303-distill-stays-local
Nov 24, 2026
Merged

captcrock merged 1 commit into
mainfrom
td/5303-distill-stays-local

Conversation

@captcrock

Copy link
Copy Markdown
Contributor

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_back asserted exactly this: a chat on vllm (http://127.0.0.1:8000/v1) was distilled on tst-default, which resolves to https://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

…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
captcrock force-pushed the td/5303-distill-stays-local branch from dbff304 to b0f1494 Compare November 24, 2026 16:35
@captcrock
captcrock merged commit b55bb91 into main Nov 24, 2026
4 checks passed
@captcrock
captcrock deleted the td/5303-distill-stays-local branch November 24, 2026 16:55
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