Skip to content

Add Apple's on-device model through Polhem.AI.Apple 0.1.0, and a Claude template - #122

Merged
jeff377 merged 3 commits into
mainfrom
claude/apple-on-device-model
Dec 5, 2026
Merged

jeff377 merged 3 commits into
mainfrom
claude/apple-on-device-model

Conversation

@jeff377

@jeff377 jeff377 commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

What

  • On macOS, Settings > Models has an Apple Intelligence template (apple:on-device). It uses the model built into macOS through Polhem.AI.Apple 0.1.0 (nuget.org): nothing to install, no key, and nothing leaves the computer. It needs macOS 26 or later on Apple Silicon with Apple Intelligence on.
  • The model takes no tools, so ToolFallbackChatClient can start with tools off and its requests go without them from the first one.
  • A model without tools now has the tool part of the instructions replaced by NoToolsText. Before, NoToolsText was appended after instructions that still said to call propose_edits, and the on-device model answered that it had proposed edits when it had not.
  • Settings > Models also gets a Claude template, second after OpenAI: Claude's OpenAI-compatible endpoint https://api.anthropic.com/v1 with claude-opus-5-5.
  • README (both languages) and the download site (four languages) mention the template.

Tests

  • dotnet build and dotnet test (Release): 552 passed, 3 skipped.
  • New tests: a client made with tools off sends the first request without them; the tool part of the app's instructions is replaced rather than contradicted; apple:on-device counts as a complete address and is recognized case-insensitively.
  • Tried in the app before the package was published (against the same source): chat, history and a summary of a whole article.

On macOS, Settings > Models gains an Apple Intelligence template that uses the model built into macOS through
Polhem.AI.Apple's IChatClient: nothing to install, no key, nothing leaves the computer. The model takes no tools, so
its requests go without them from the first one.

A model without tools is now told so in place of the instructions about the tools, instead of after them. Before, it
was told both to call propose_edits and that it had no tools, and a small model would claim to have proposed edits.
@jeff377
jeff377 enabled auto-merge (squash) December 5, 2026 05:56
Claude's OpenAI-compatible endpoint at https://api.anthropic.com/v1 takes the requests the app already sends, so the
template only fills in the address and claude-opus-5-5. It comes second, after OpenAI.
auto-merge was automatically disabled December 5, 2026 06:08

Pull Request is not mergeable

@jeff377 jeff377 changed the title Add Apple's on-device model through Polhem.AI.Apple 0.1.0 Add Apple's on-device model through Polhem.AI.Apple 0.1.0, and a Claude template Dec 5, 2026
@jeff377
jeff377 merged commit 0669aef into main Dec 5, 2026
6 checks passed
@jeff377
jeff377 deleted the claude/apple-on-device-model branch December 5, 2026 06:27
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.

1 participant