Repository navigation
feat(local-llm): optional Atomic Chat Core engine, hidden behind an opt-in - #623
Merged
Merged
Conversation
Use the authenticated Core control API for backend acquisition and model ownership while preserving native inference endpoints. Keep engine changes explicit, verify release downloads, and carry cancellation and update status through the terminal interface.
Brings in #621 (queued local model switching), #625 (modelMode, config v75) and #618 (compaction). Conflict resolution: - local-models-orchestrator: #621's ModelOperationQueue now owns serialization and supersession of starts, stops and selections, so the branch's startGeneration counter is dropped. setActive keeps #621's queued request; the Core engine and its signal are passed through to the chat and embedding starts. Core loads are still tracked so Stop and shutdown can cancel a non-replacing embedding start the queue would not abort; the queue signal and the Stop signal are combined. stopGeneration and captureStopGuard stay for composer route changes. chooseEngine runs through the queue so an engine change supersedes a waiting start. - daemon-lifecycle: keep both engine and healthTimeoutMs/signal options. - models start: runLocalModelsStart takes { interactive, signal }. The engine setting is an additive optional field defaulting to llama-server, so no config migration is needed after v75.
…h no Core session stopDaemon and stopEmbeddingDaemon ask Core first on every stop. That took the cross-process engine lock and created the core folder even for users who never chose Atomic Chat, so a busy or stale lock could make a plain llama-server stop throw.
A model start resumes the message queue (#621). When that start belonged to a composer engine or Fusion seat change, the drained message was moved into the editor, replacing any draft, and the rest of the queue stalled. It now returns to the head of the queue, and the queue resumes once the route change ends.
Stop aborted Core loads with its own controller before the queue aborted the start operation, so the start saw an unexpected error and reported "start failed" for a load the operator had just cancelled. The queue now aborts the start first and the remaining Core loads are cancelled after. Shutdown follows the same order.
…lling it The merge queued chooseEngine as a replacing operation, which aborted a model that was loading. Engine selection promises never to stop a model, so it now queues without replacing; the running check then refuses the change with the usual "Stop local models" message.
…s in progress The no-record fast path let Stop report success while another process was still loading a Core model, whose record is written only when the load finishes. The lock is now skipped only with no core folder at all, or with no record and no operation lock files.
The choice waits in the queue without replacing the load, so Stop's abort never reached it and the engine was saved after the stopped load. The choice now checks the Stop guard before it runs and again before saving.
Stop cancels a Core embedding load that the queue does not own, and the abort was reported as "embedding daemon failed". A start cancelled by Stop, shutdown or a newer operation now ends quietly.
ATOMIC_AGENT_EXPERIMENTAL_ATOMIC_CORE=1, or a config that already selects atomic-core, enables the choice. Frontends use this one helper.
Until Windows and Linux are validated, Local mode is back to the backend and model controls, the Fusion engine lists offer only Local llama, and choosing atomic-core from the TUI is refused with how to opt in. The choice returns with ATOMIC_AGENT_EXPERIMENTAL_ATOMIC_CORE=1 or when the config already selects atomic-core. The refresh snapshot carries the flag as backend.atomicCoreChoice.
Desktop reads it to decide whether to offer Atomic Chat. The engine command itself stays available without the opt-in.
sosidudku1
marked this pull request as ready for review
October 12, 2026 11:43
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.
Adds Atomic Chat Core as an optional inference engine next to llama.cpp, for the terminal app and the runtime the desktop app uses.
What
ATOMIC_AGENT_EXPERIMENTAL_ATOMIC_CORE=1, or when the saved config already selectsatomic-core, until Windows and Linux are validated.atomic-agent models engine statusreportschoiceEnabled. Existing installs stay on llama.cpp with no prompt, download or new network call.Changes on top of the original draft
main: feat(local-models): speedy model switcher patch #621's model operation queue now owns start, stop and select ordering ("newer pick wins"); the engine and the queue signal reach chat and embedding starts.How it was verified
Merged together with #627 on current
main:npm run build,lint,imports:check,docs:check,typecheck:tests,test:ci(1,135 files, 13,716 tests passed) andsmoke:e2eall pass. Not yet validated: Windows and Linux native Core execution, which is why the choice stays hidden.Desktop companion: #624.