Repository navigation
Add an Apple Intelligence connection through fm serve - #208
Open
Will Walker (willswire) wants to merge 2 commits into
Open
Will Walker (willswire) wants to merge 2 commits into
Will Walker (willswire) wants to merge 2 commits into
Conversation
…rve` macOS 27's `fm serve` is a local Chat Completions server with native tool calls, so PCC needs no new provider: a macOS-only "Apple Intelligence (fm serve)" connection preset points openai-chat at 127.0.0.1:1976 with model pcc and its measured 32,768-token window. reasoning_effort is sent for pcc at low/medium/high only; fm rejects other levels with HTTP 400. docs/apple-fm.md records setup and the spike findings, including that PCC answers only when fm serve was started from Terminal.app. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tile showed a bare "A": no icon was bundled for it. Apple's mark comes from the same LobeHub set (1.107.0) as the others, asked for through SERVICE_WORDS so a regeneration keeps it; no other name resolves differently. The preset is now named plainly "Apple Intelligence". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Will Walker (willswire)
requested a review
from Zezi Zeng (ClarenceStark)
as a code owner
December 6, 2026 14:21
|
Thanks for the pull request! A few friendly reminders based on the files changed:
(This comment updates automatically when you edit the PR description or push new commits.) |
fm serve
This branch has not been deployed
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.
Linked issue
Fixes #206. Works without #207, but until #207 is merged, an overflow on PCC is retried (and counts against the
daily quota);
docs/apple-fm.mddescribes the behaviour with #207.What changed (Before / After)
fm servespeaks Chat Completions,its address, the model name
pccand its window, and no reasoning effort was sent to it.openai-chatconnection to
127.0.0.1:1976/v1with modelpccand a 32,768-token window. Reasoning effort is sent forpccat low/medium/high (fm rejects other levels with HTTP 400). The tile shows Apple's logo from the bundled LobeHub
icon set;
scripts/model-icons.pynow asks for it.docs/apple-fm.mdexplains the setup and the one condition:PCC answers only if
fm servewas started from Terminal.app. The README provider table links to it.No new provider, dependency or sign-in;
fm servetakestoolsand returnstool_calls, so the model sees thesame prompt and
bashtool as with any Chat Completions service.Visual proof (UI / TUI / Web / Desktop / export changes)
Settings → Models → Add a connection, on macOS.
Before:
After:
How you verified it
tests/test_connections.py: the preset is offered on macOS and not elsewhere, saves as a keyless connection, andnew sessions get
pccwith a 32,768 window.tests/test_provider_conformance.py: the effort mapping for every level, and none for the on-devicesystemmodel.
tests/test_model_icons.py: Apple's logo is bundled for the tile; no other name resolves to a different icon.uv run pyflakes src tests .github/scripts; the tests above pass;tests/test_web_connection_checks.pyandtests/test_web_model_settings.pypass with a real browser.fm servestarted from Terminal.app:freehand -p "Use bash to run 'echo hi', then tell me exactly what it printed." --provider openai-chat --api-base http://127.0.0.1:1976/v1 --model pcc --effort lowranecho hiand answered correctly. The window (32,768) and the error shapes in thedocs were measured against the same server.
PCC is a mid-size model with a 32K window and a daily quota; the docs mark this experimental and make no benchmark
claims.
AI disclosure & checklist
uv run pyflakes src tests .github/scriptsprints nothing and relevant tests pass locally (full suite runs in CI)CHANGELOG.mduntouched (maintainers update it at release time)src/freehand/runtime/still uses only the standard library and imports on Python 3.9🤖 Generated with Claude Code