OpenAppleModels is an open-source framework and developer runtime engineered by SpaceCorps that unlocks real tool calling and agent loops for Apple's on-device Foundation Models. It enables game developers, mobile engineers, and autonomous AI agents to build on-device AI features for iOS, iPadOS, macOS and visionOS 27 without API keys or cloud server costs. It is pre-release: there are no tagged releases yet, and all measurements so far come from macOS 27.
macOS 27 introduced Apple's native fm CLI tool and an OpenAI-compatible fm serve local endpoint. However, rigorous probing revealed that fm serve injects your tools but never emits tool_calls (0 of 54 attempts in systematic testing), and setting tool_choice: "required" returns an HTTP 500 error. Within the native Swift FoundationModels framework, setting toolCallingMode: .required made the model keep calling tools without answering (40+ calls in one respond, 3 of 3 runs).
SpaceCorps engineered OpenAppleModels to solve these fundamental limitations at the engine level.
OpenAppleModels introduces fine-grained per-step loop control: requiring a tool call on step 1 to ground the response (e.g. checking game inventory or player health), then automatically transitioning to generating natural dialogue or structured JSON. It provides dynamic JSON Schema tool conversion, game NPC personas with memory (facts, a relationship score and a summary), an embeddable OpenAI-compatible HTTP server with real tool_calls, and a JSON-RPC 2.0 bridge over stdio and a C ABI, with bindings for C, Python and Unity and integration notes for Godot and Unreal.
Like every SpaceCorps project, OpenAppleModels is built with one third-party dependency (swift-argument-parser, for the CLI), on-device processing by default, testing via a scripted model, and universal developer accessibility under the MIT license.