Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(coach): default the AI Coach to Apple's on-device foundation model - #76

Merged
saksham2001 merged 3 commits into
saksham2001:mainfrom
rgvxsthi:feat/coach-default-apple
Jul 10, 2026
Merged

saksham2001 merged 3 commits into
saksham2001:mainfrom
rgvxsthi:feat/coach-default-apple

Conversation

@rgvxsthi

Copy link
Copy Markdown
Contributor

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.providerMode default .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

  • One-line default change; no API changes.
  • Existing users unaffectedCoachSettings decodes tolerantly (decodeIfPresent ?? default), so a saved provider is preserved; only fresh installs / unset settings get the Apple default.
  • Coach stays opt-in (master switch off by default).
  • Graceful on unsupported devices — Coach settings already show an "On-device unavailable" card guiding the user to enable Apple Intelligence or pick another provider (no silent failure).

Builds clean.

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).
@rgvxsthi
rgvxsthi requested a review from saksham2001 as a code owner July 10, 2026 00:34
saksham2001
saksham2001 previously approved these changes Jul 10, 2026
@saksham2001
saksham2001 merged commit 5c452c8 into saksham2001:main Jul 10, 2026
2 checks passed
@rgvxsthi
rgvxsthi deleted the feat/coach-default-apple branch July 12, 2026 09:14
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.

2 participants