Repository navigation
feat(ai): choose the AI server with stack ai switch - #168
Merged
Merged
Conversation
With chat on an AI server elsewhere and voice on this Mac, every `./stack up ai` warned about a remote endpoint and asked to switch the whole stack to the local engine. A no cancelled the start, so the speech services could not be started or restarted without giving up the chosen server. The question now belongs to the first `./stack up ai` only, which installs the stacklet. Once installed, `./stack up ai` starts what the stacklet runs and keeps `[ai]` as it is; it names `./stack ai connect local` as the way to switch to this Mac's engine. Fixes: 6d994d3 ("feat(ai): ask before stack up ai replaces a remote AI server")
arthware-dev
force-pushed
the
fix/ai-up-keeps-external-engine
branch
from
September 27, 2026 13:15
b77fd20 to
8f62639
Compare
After pointing the stack at another AI server, the first `./stack up ai` offered two answers: move chat and voice to this Mac, or cancel. A Mac that serves its own AI app, or uses a server elsewhere for chat, could not get speech-to-text and text-to-speech from the ai stacklet without first installing an engine it does not use. The question is now whether this Mac's engine takes over. Yes works as before. No, the default, keeps the server for chat and installs only Whisper and the speech container. A server on this Mac, such as `localhost:8888`, is described as one the stack does not manage instead of as remote.
A stacklet served by another machine ran only its checks marked `remote`. With chat on a server elsewhere and voice from the ai stacklet here, a stopped Whisper or speech container was never reported by `./stack list` or `./stack status`. When the stacklet's containers run here too, all its checks apply. The row shows `localhost` instead of `remote` when the server is on this Mac and the stack does not manage it, since no other machine is involved.
`./stack ai switch <target>` replaces `./stack ai connect`. The target is an address the stack does not manage (another machine, a hosted provider, or an AI app on this Mac such as `localhost:8888`), or `managed` for the engine the ai stacklet runs. `managed` runs `./stack up ai`, which installs oMLX when it is missing and starts it, then checks the engine and picks a model as for any other server. When the engine does not come up, `[ai]` stays as it was. Starting the ai stacklet with the stack managing the engine now installs a missing oMLX instead of stopping with a `stack destroy ai` recovery.
A change to something that never shipped breaks no existing setup, so it takes no `!` and no `BREAKING CHANGE:` footer. The footer table did not say what "existing" is measured against.
arthware-dev
force-pushed
the
fix/ai-up-keeps-external-engine
branch
from
September 27, 2026 13:35
e0137ac to
fe56e81
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.
Summary
./stack up aikeeps the AI server the admin chose: an installed stacklet no longer asks on every start to switch the whole stack to the local engine, which blocked restarts on a Mac with chat elsewhere and voice here. The first./stack up aican install only speech-to-text and text-to-speech../stack ai switch <target>replaces./stack ai connect:managedbrings up the engine the stack runs (installing oMLX when missing), any other target is a server the stack does not manage, such aslocalhost:8888../stack listshows a server on this Mac aslocalhost, and checks the voice services here even when chat is served elsewhere.