Providers
Apple Foundation Models, Gemini Nano and cloud, through the Callstack react-native-ai providers. Llama is not supported yet.
Ondai reaches models only through @ondai/core adapters, which wrap the Callstack react-native-ai packages (0.12, Vercel AI SDK v6).
| Provider | Package | Capabilities | Notes |
|---|---|---|---|
| Apple Foundation Models | @react-native-ai/apple | text, structured (constrained decoding), tools, embeddings, transcription, speech | iOS 26+, Apple Intelligence on. 4,096-token context. No image input: Apple's model takes images from iOS 27, but the 0.12 package does not pass them on. |
| Gemini Nano | @react-native-ai/adk | text, structured (schema in the prompt, validated by Ondai), vision | Android 14+ physical device with AICore, foreground only, per-app quotas. Image input is in beta. Tool calling is an alpha preview, so Ondai does not route tools to Nano. |
| Llama (not supported yet) | @react-native-ai/llama | text, structured (schema in the prompt), embeddings | The adapter exists, but llama.rn does not support the React Native version Ondai targets yet. Opt-in GGUF download (~1 GB). |
| Cloud | any AI SDK model | whatever the model supports | Only with allowCloud: true. |
import { appleAdapter } from '@ondai/core/apple'
import { nanoAdapter } from '@ondai/core/adk'
import { llamaAdapter } from '@ondai/core/llama'
import { cloudAdapter } from '@ondai/core'Apple specifics
- Tools are provider-executed: the Foundation Models session runs the loop natively, so AI SDK step callbacks never fire. Ondai's tool policy still works, because confirmation happens inside each tool's
execute. - Structured output supports objects, arrays, strings, numbers, booleans and enums; no string formats, regex or unions. Streaming structured output is not supported.
- The guardrail can refuse benign content; Ondai shows a calm refusal state and never retries refusals.
- Cold start is roughly a second;
prewarm: 'on-focus'hides it.
Gemini Nano specifics
@react-native-ai/adk 0.12 rejects a response schema, so the Nano adapter sets structuredOutput: 'prompt': Ondai puts the JSON Schema in the instructions, parses the reply and validates it with zod (any provider that rejects a schema falls back the same way on its own).
isNanoSupported() says whether the device can ever run Nano; isAvailable('genai-nano') says whether it is ready now (downloading shows as preparing). Add minSdkVersion 26 and the packaging excludes from the ADK README through expo-build-properties.
Llama specifics (not supported yet)
llama.rn does not support the React Native version Ondai targets yet.
llamaAdapter({ modelId: 'owner/repo/file.gguf', autoDownload: 'wifi-only' }) reports unavailable: model-downloading until the app calls download(). Keep it opt-in and show ModelDownload.











