Skip to content

[codex] Add WWDC26 Apple Intelligence APIs#215

Draft
grabbou wants to merge 1 commit into
mainfrom
feat/apple-foundation-models
Draft

[codex] Add WWDC26 Apple Intelligence APIs#215
grabbou wants to merge 1 commit into
mainfrom
feat/apple-foundation-models

Conversation

@grabbou

@grabbou grabbou commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the WWDC26 Apple Intelligence API surface to @react-native-ai/apple, with the common paths exposed through AI SDK-compatible models and Apple-only behavior kept behind providerOptions.apple or low-level native helpers.

What changed

  • Added Apple provider types and exports for model IDs, provider options, model info, image styles, image personalization, and context controls.
  • Added apple.getModelInfo({ locale, model }) and native getModelInfo(locale, model) for availability, locale support, supported languages, context metadata, and capability flags.
  • Added model selection for SystemLanguageModel.default and iOS 27 PrivateCloudComputeLanguageModel through providerOptions.apple.model and createAppleProvider({ model }).
  • Added context helpers inspired by Apple Dynamic Profile/history utilities: rolling message windows and completed tool-call pruning.
  • Added AI SDK image prompt support by converting image/* file parts into Apple Foundation Models prompt attachments.
  • Added Image Playground generation through apple.imageModel(), including style options, source image serialization, and personalization when the SDK exposes ImagePlaygroundOptions.
  • Added iOS 27 Vision built-in tool support for OCRTool and BarcodeReaderTool via providerOptions.apple.builtInTools.
  • Extended the low-level native API with generateImages and getModelInfo wrappers.
  • Revamped Apple generation docs and package README to cover requirements, SDK gates, PCC, image prompts, image generation, Vision tools, context strategy, and direct native API boundaries.

Notes

Several Apple Intelligence symbols are SDK-gated as well as OS-gated. The implementation compile-gates newer APIs so current Xcode 26.0 / iPhoneOS 26.0 SDK builds keep working while newer SDKs can enable the newer paths.

Full iOS 27 native compilation still needs validation on an SDK that exposes the iOS 27 Foundation Models symbols.

Validation

  • bun run --filter='@react-native-ai/apple' typecheck
  • bun run --filter='@react-native-ai/apple' prepare
  • git diff --check
  • Targeted swiftc -typecheck probes for local SDK-visible Foundation Models and Image Playground APIs

@vercel

vercel Bot commented Jun 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ai Ready Ready Preview, Comment Jun 9, 2026 9:25am

Request Review

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