Skip to content

[codex] add Private Cloud Compute support to Apple provider#217

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

[codex] add Private Cloud Compute support to Apple provider#217
grabbou wants to merge 1 commit into
mainfrom
feat/apple-foundation-models-wwdc26

Conversation

@grabbou

@grabbou grabbou commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the WWDC26 Apple Foundation Models surface that fits the current Apple provider without broad API churn:

  • Adds apple('private-cloud-compute') / apple.languageModel('private-cloud-compute') while keeping system-default as the default model.
  • Adds AI SDK v6-native providerOptions.apple.reasoningLevel with light, moderate, and deep validation.
  • Threads model and reasoningLevel through the native generation options.
  • Adds guarded Swift support for PrivateCloudComputeLanguageModel and iOS 27 ContextOptions; Xcode 26/iOS 26 SDK builds still compile and return UNSUPPORTED_OS for PCC-only paths.
  • Maps Apple rate-limit/quota failures to public AppleLLMErrorCodes.RateLimited / RATE_LIMITED.
  • Updates package, website, README, and skill docs for AI SDK v6, PCC requirements, reasoning, and context-window differences.

Why

Apple's WWDC26 Foundation Models updates added Private Cloud Compute access through the same LanguageModelSession API, plus iOS 27 ContextOptions reasoning levels. The provider previously always used SystemLanguageModel.default, so React Native users had no narrow way to opt into PCC from the Vercel AI SDK model surface.

I intentionally did not add image attachments, custom LanguageModel providers, dynamic profiles, or PCC quota introspection in this PR. Those need separate JS/native API design and would make this change much wider.

Validation

  • bun run lint
  • bun run typecheck
  • bun run --filter='@react-native-ai/apple' prepare
  • git diff --check
  • Swift compiler guard probe with Xcode 26 / Swift 6.2 to verify iOS 27-only symbols compile out on the current SDK

prepare emits existing stale Browserslist/baseline data warnings, but exits successfully.

References

@vercel

vercel Bot commented Jun 11, 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 11, 2026 7:42pm

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