Olleh provides an Ollama-compatible API to Apple's new Foundation Models, announced at WWDC 2025. It serves as a bridge between Apple's native AI capabilities and the Ollama ecosystem, offering both a command-line interface and an HTTP API for seamless integration with existing tools and workflows.
- macOS 26 beta or later
- Apple Silicon Mac (M1 or later)
- Xcode 26 beta / Swift 6.2+
brew install loopwork/tap/olleh
git clone https://github.com/loopwork/olleh.git
cd olleh
make
sudo make install # installs to /usr/local/bin/
# Check if Foundation Models are available
olleh check
# Start the Ollama-compatible API server
olleh serve
# Chat interactively with the model
olleh run default
❯ olleh
OVERVIEW: Ollama-compatible CLI for Apple Foundation Models
USAGE: olleh <subcommand>
OPTIONS:
--version Show the version.
-h, --help Show help information.
SUBCOMMANDS:
serve Start olleh
run Run a model interactively
list List models
show Show model information
check Check availability
See 'olleh help <subcommand>' for detailed help.
Start the Ollama-compatible HTTP API server.
# Default configuration (port 11941)
olleh serve
# Verbose logging
olleh serve --verbose
# Bind to specific host and port
olleh serve --host 0.0.0.0 --port 11434 # default ollama port
Start an interactive chat session with the model.
$ olleh run default
>>> Enter a message (/? for help)
Use Ctrl+C
or type /bye
to exit the chat session.
List all available models.
Currently returns only the default
Foundation Model.
$ olleh list
NAME ID SIZE MODIFIED
default N/A 2 weeks ago
Show information about a model.
$ olleh show default
Model
architecture foundation
parameters 3B
context length 65536
embedding length 2048
quantization 2b-qat
Capabilities
completion
tools
Parameters
temperature 0.7
License
Apple Terms of Use
Verify that Foundation Models are available on your system.
$ olleh check
Foundation Models available
When running olleh serve
,
the following Ollama-compatible endpoints are available:
POST /api/generate
- Generate text completionsPOST /api/chat
- Chat with the modelGET /api/tags
- List available modelsGET /api/show
- Show information about a model
You can use Olleh with the Ollama Swift client library:
import Ollama
// Connect to olleh server (default port: 11941)
let client = Client(host: URL("http://localhost:11941")!)
// Generate text using Apple's Foundation Models
let response = try await client.generate(
model: "default",
prompt: "Tell me about Swift programming.",
options: [
"temperature": 0.7,
"max_tokens": 100
]
)
print(response.response)
# Generate text with streaming
curl http://localhost:11941/api/generate -d '{
"model": "default",
"prompt": "Why is the sky blue?",
"stream": true
}'
# Chat completion
curl http://localhost:11941/api/chat -d '{
"model": "default",
"messages": [
{"role": "user", "content": "Hello, how are you?"}
],
}'
Olleh currently supports the lone default
model
provided by Apple's Foundation Models framework.
Future releases may include:
- Support for specialized models as they become available
- Integration with custom adapters
- Model configuration and fine-tuning options
This project is licensed under the Apache License, Version 2.0.