Discover and explore top open-source AI tools and projects—updated daily.
anthropicsClaude LLM integration for Apple's Foundation Models
Top 97.8% on SourcePulse
This package integrates Anthropic's Claude models into Apple's Foundation Models framework, enabling developers on Apple platforms to leverage powerful LLM capabilities. It allows seamless use of Claude via the familiar LanguageModelSession API, supporting advanced features like streaming, guided generation, and server-side tool execution, thereby simplifying LLM integration in native applications.
How It Works
The core mechanism involves conforming Claude to Apple's LanguageModel protocol. Developers instantiate ClaudeLanguageModel with authentication and model details, then pass it to LanguageModelSession. This abstraction layer ensures that Claude's responses, streaming, structured output, and tool-calling functionalities are accessible through the unified Foundation Models interface, mirroring the experience of using Apple's on-device models.
Quick Start & Requirements
Package.swift or Xcode).https://github.com/anthropics/ClaudeForFoundationModels.gitHighlighted Details
ClaudeModel constants (e.g., .sonnet5, .opus4_8) that encapsulate model capabilities, ensuring API compatibility. Dateless IDs represent pinned model snapshots.@Generable structs, and configurable server-side tools (web search, code execution).low to max) via the fixedEffort parameter, mapping to Foundation Models' reasoning levels..apiKey for development and .proxied for production, requiring a backend relay to manage credentials server-side.Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
1 week ago
Inactive
emcf
cloudflare
kyrolabs