I hacked this together last fall to let you use Apple Foundation Models with llm: https://github.com/btucker/llm-apple . To enable that I built python bindings with Claude Code: https://github.com/btucker/apple-foundation-models-py
Unfortunately, I found the small context window makes the utility pretty limited.