Models
The inference block names the model and how Loom reaches it. Changing models is a change to the
bundle, never to code.
Cloud APIs
Section titled “Cloud APIs”inference: provider: anthropic # or openai, openrouter model: claude-haiku-5-5The key comes from <PROVIDER>_API_KEY in the environment (ANTHROPIC_API_KEY, OPENAI_API_KEY,
OPENROUTER_API_KEY), or from a vault reference with secret_ref: vault://<namespace>/<name>. Keys
never go in the bundle itself.
Local servers
Section titled “Local servers”Any OpenAI-compatible server works: Ollama, vLLM, llama.cpp, LM Studio. Name it anything and give its endpoint:
inference: provider: local model: qwen3:4b endpoint: http://127.0.0.1:11434/v1 location: locallocation is a declaration Loom checks at load. With provider: local, the endpoint must be on
loopback.
In process on Apple silicon
Section titled “In process on Apple silicon”inference: provider: mlx model: "~/models/Qwen3-4B-4bit" location: localInstall the extra once with uv sync --extra mlx.
Coding-agent CLIs
Section titled “Coding-agent CLIs”claude-cli and codex-cli run the claude or codex CLI as a subprocess, signed in as you, with no
API key. They can keep a session between calls with session: keep.
inference: provider: claude-cli model: haikuEmbedded
Section titled “Embedded”provider: host means the app embedding Loom supplies the model itself, such as Apple Foundation
Models in an iPhone app. See Embed Loom.
Structured output
Section titled “Structured output”Loom always validates the model’s answer against a schema. Today it asks for JSON in the prompt, parses it and validates it, and on failure sends the errors back and asks again. That works with every model. Validation is never skipped, whatever the model.