feat(coach): default the AI Coach to Apple's on-device foundation model - #76
Merged
Merged
Conversation
Change the default provider from OpenAI (user's ChatGPT key) to Apple's on-device foundation model — CoachSettings.providerMode default .userOpenAIKey -> .appleOnDevice. The old default required an OpenAI API key before the coach did anything, which walls off everyone without an LLM provider key. Apple's foundation model runs on-device with no key, so enabling the coach just works, keeps health context private, and costs nothing. It covers the common coach cases (summaries, check-ins, Q&A over metrics); users who want a more powerful hosted model can switch provider and add their key in Settings — this moves the default only, it removes nothing. Tolerant Codable decode preserves each existing user's saved provider; only fresh installs / unset settings get the Apple default. The coach master switch stays off by default (opt-in). On devices without Apple Intelligence, Coach settings already show an availability card guiding the user to enable it or pick another provider (no silent failure).
saksham2001
previously approved these changes
Jul 10, 2026
saksham2001
approved these changes
Jul 10, 2026
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.
Re-opens the change from #67 (that PR couldn't be reopened via the API after it was closed; same branch/commit
feat/coach-default-apple). Per discussion with the maintainer.What
Make Apple's on-device foundation model the default AI Coach provider instead of OpenAI. One-line change:
CoachSettings.providerModedefault.userOpenAIKey→.appleOnDevice.Why
The old default required the user to obtain and paste an OpenAI API key before the coach did anything — a wall for the majority who don't have an LLM provider key. Apple's foundation model needs no key and runs on-device, so the coach works out of the box, keeps health context private, and costs nothing. It covers the common cases (summaries, check-ins, Q&A over metrics); anyone who wants a more powerful hosted model can switch provider + add their key in Settings — this moves the default only, it removes nothing.
Scope & safety
CoachSettingsdecodes tolerantly (decodeIfPresent ?? default), so a saved provider is preserved; only fresh installs / unset settings get the Apple default.Builds clean.