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).

ProviderPackageCapabilitiesNotes
Apple Foundation Models@react-native-ai/appletext, structured (constrained decoding), tools, embeddings, transcription, speechiOS 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/adktext, structured (schema in the prompt, validated by Ondai), visionAndroid 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/llamatext, structured (schema in the prompt), embeddingsThe adapter exists, but llama.rn does not support the React Native version Ondai targets yet. Opt-in GGUF download (~1 GB).
Cloudany AI SDK modelwhatever the model supportsOnly 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.

On this page