[codex] add Private Cloud Compute support to Apple provider#217
Draft
grabbou wants to merge 1 commit into
Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the WWDC26 Apple Foundation Models surface that fits the current Apple provider without broad API churn:
apple('private-cloud-compute')/apple.languageModel('private-cloud-compute')while keepingsystem-defaultas the default model.providerOptions.apple.reasoningLevelwithlight,moderate, anddeepvalidation.modelandreasoningLevelthrough the native generation options.PrivateCloudComputeLanguageModeland iOS 27ContextOptions; Xcode 26/iOS 26 SDK builds still compile and returnUNSUPPORTED_OSfor PCC-only paths.AppleLLMErrorCodes.RateLimited/RATE_LIMITED.Why
Apple's WWDC26 Foundation Models updates added Private Cloud Compute access through the same
LanguageModelSessionAPI, plus iOS 27ContextOptionsreasoning levels. The provider previously always usedSystemLanguageModel.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
LanguageModelproviders, 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 lintbun run typecheckbun run --filter='@react-native-ai/apple' preparegit diff --checkprepareemits existing stale Browserslist/baseline data warnings, but exits successfully.References