Skip to content

apple_fm_shim

apple_fm_shim

Apple Foundation Models shim.

Thin FastAPI server exposing Apple FM as OpenAI-compatible API. Only runs on macOS 15+ with Apple Silicon. Wraps python-apple-fm-sdk's LanguageModelSession as /v1/chat/completions and /v1/models endpoints.

Token counts: The Apple FM SDK does not expose token counts. The shim returns 0 for all token counts. Throughput and energy benchmarks will reflect this limitation.

Usage: uvicorn openjarvis.engine.apple_fm_shim:app --host 127.0.0.1 --port 8079