Skip to content

feat: add Apple FoundationModels on-device LLM adapter#58

Open
ZhunHao wants to merge 1 commit intoryanstephen:mainfrom
ZhunHao:main
Open

feat: add Apple FoundationModels on-device LLM adapter#58
ZhunHao wants to merge 1 commit intoryanstephen:mainfrom
ZhunHao:main

Conversation

@ZhunHao
Copy link
Copy Markdown

@ZhunHao ZhunHao commented Apr 30, 2026

  • Add .foundationModels case to AgentProvider with framework-based availability detection (not binary-based like CLI providers)
  • Create FoundationModelsSession adapter wrapping LanguageModelSession streaming API into lil-agents' callback-based AgentSession protocol
  • Wire /clear to resetContext() for lightweight context reset
  • Guard with #if canImport(FoundationModels) for pre-macOS 26 compat

- Add .foundationModels case to AgentProvider with framework-based
  availability detection (not binary-based like CLI providers)
- Create FoundationModelsSession adapter wrapping LanguageModelSession
  streaming API into lil-agents' callback-based AgentSession protocol
- Wire /clear to resetContext() for lightweight context reset
- Guard with #if canImport(FoundationModels) for pre-macOS 26 compat
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