Compatibility facts

Released0.5.3

OpenAI endpoint compatibility

Chat, legacy completions, model listing, and embeddings use compatible request and response shapes.

Compatibility is endpoint-specific. macMLX model load and unload routes under /x/models are project extensions, not OpenAI-compatible model management.

Verified

Released0.5.3

Anthropic Messages compatibility

POST /v1/messages, including streaming, is available in v0.5.3.

This is Messages API compatibility only, not compatibility with the full Anthropic API.

Verified

Released0.3.7

Selected Ollama endpoints

macMLX supports /api/version, /api/tags, /api/show, /api/chat, and /api/generate.

The compatibility layer has shipped since v0.3.7. It is a selected endpoint set, not a drop-in replacement for every Ollama API.

Verified

Released0.5.0

MCP server

The CLI can expose local inference to MCP clients.

The MCP server shipped in v0.5.0 and is separate from chat-side routing to external tools.

Verified

Released0.5.3

MCP client pool

v0.5.3 includes managed MCP client connections.

The pool manages external MCP processes and connections; integrated chat-side tool routing is a separate capability released in v0.6.0.

Verified

Released0.6.0

Integrated chat tool routing

v0.6.0 ships multi-turn tool routing for OpenAI, Anthropic, and the GUI MCP loop.

Protocol-specific validation keeps tool-call histories explicit; this routing is distinct from the MCP server and client-pool infrastructure.

Verified

Released0.5.3

Local embeddings

POST /v1/embeddings shipped in v0.5.3.

Encoder-family model detection exists, while using an unsuitable chat model can still produce vectors without semantic guarantees.

Verified

Released0.10.0

Rerank on MLXRerankers

v0.10.0 serves POST /v1/rerank through mlx-swift-lm's MLXRerankers: BERT, RoBERTa, and XLM-RoBERTa cross-encoders, Qwen3 rerankers scored by their yes/no logit margin, and Jina reranker v3.

What ran on real checkpoints: ms-marco-MiniLM-L-6-v2 matches the PyTorch fp32 reference to 2e-6 on the logit scale with TF32 off, and to 0.025 under the TF32 matmuls M5 enables by default; Qwen3-Reranker-0.6B-4bit ranks the documents that answer the question above the ones that do not. The XLM-RoBERTa path (BGE) and Jina v3 were not run on a real checkpoint, and Jina v3 reports a cosine similarity rather than a probability. Classification heads qualify more narrowly than upstream's own rule, so sentiment heads stay plain models, and bi-encoder cosine stays the fallback for checkpoints that are not rerankers.

Verified

Released0.9.0

In-process speech to text and text to speech

POST /v1/audio/transcriptions and POST /v1/audio/speech run on MLX inside the same Swift process.

The audio engine is mlx-audio-swift, so the default path still needs no Python runtime and no Core ML detour, and downloads land under ~/.mac-mlx/audio-models. A request for an output container macMLX cannot produce is refused rather than served as a different format. These paths are code-complete and unit-tested; they have not been validated against real audio checkpoints, so no transcription or synthesis quality is claimed.

Verified

Released0.6.0

Eligibility-gated continuous batching

v0.6.0 batches only eligible dense-text requests under real concurrency, with automatic serial fallback.

The tagged 4-client benchmark measured 2.5–3.2× aggregate throughput. VLM, speculative decoding, Ollama, Anthropic, and embeddings remain serial.

Verified

Released0.6.0

Structured output

v0.6.0 supports response_format with json_object and an explicit JSON Schema subset.

Unsupported schema keywords return 400. VLM with structured output and tools with structured output are unsupported combinations and are explicitly rejected rather than silently degraded.

Verified

Released0.10.0

Foundation-Models-shaped JSON schemas

Since v0.10.0, structured output accepts the schema shapes Apple's Foundation Models client sends for @Generable types: nested objects, arrays with minItems and maxItems, $ref to the root's $defs or definitions, a string const, any type at the root, keys and literals in any Unicode string, and minimum or maximum bounds on numbers and integers.

A schema may nest at most 32 containers deep and hold at most 4,096 nodes after $ref expansion; a recursive schema is a 400, and null, unions, pattern, and multipleOf remain unsupported. A constrained request on a thinking model renders with enable_thinking off and is never reported as reasoning. In v0.11.0 an integer with no bounds is held to the 64-bit integer range so that it always parses, though the value within it is still the model's choice. Which @Generable types were run end to end through Apple's client is stated by the Xcode 27 and Foundation Models fact; a schema shape accepted here is not by itself a verified integration.

Verified

Released0.10.0

Streaming usage, max_completion_tokens, and cached tokens

v0.10.0 honors stream_options.include_usage with one usage-only chunk before [DONE], accepts max_completion_tokens as the newer spelling of max_tokens, and reports how much of the prompt the prompt cache served.

Cached tokens appear as prompt_tokens_details.cached_tokens on OpenAI-shaped responses and as cache_read_input_tokens on /v1/messages, where input_tokens becomes the uncached remainder. The figure is 0 on a miss and on paths that never consult the cache, and it is withheld from requests that carry an Origin header because it is an exact prefix oracle. include_usage is ignored on a non-streaming request, whose body already carries usage. This covers these usage fields only, not every OpenAI streaming option.

Verified

Released0.6.0

API compatibility pack

v0.6.0 adds logit_bias, logprobs and top_logprobs, XTC, per-request LoRA adapters, and tools.

An explicit compatibility matrix governs parameter combinations, and unsupported pairs return 400 instead of silently degrading.

Verified

Released0.6.0

KV-cache quantization

v0.6.0 exposes kv_bits, kv_group_size, and quantized_kv_start for compatible requests.

These controls change KV-cache precision, not model-weight precision. Nonpositive kv_bits disables the feature, and the compatibility matrix rejects unsupported model or request combinations.

Verified

Released0.11.0

OpenAI Responses API

v0.11.0 serves POST /v1/responses, so Codex and other Responses clients can run their agent loop against macMLX: text, streamed reasoning, function and custom tools, multi-turn tool results, structured output through text.format, and usage with prompt-cache hits.

It is stateless: no response is stored, store is ignored, and previous_response_id, item_reference items, background, and file ids are a 400, so a client sends the whole conversation every turn, as Codex does. Hosted tools such as web_search are not offered to the model and are ignored rather than rejected, tool_choice other than none and parallel_tool_calls are echoed but not enforced, images must be base64 data URLs, and requests are served one at a time, so Codex sub-agents queue rather than run in parallel. This is the Responses surface Codex uses, not the full OpenAI Responses API.

Verified

Released0.11.0

Claude Code on /v1/messages

v0.11.0 adds thinking to /v1/messages, returning the model's reasoning as a thinking block, and POST /v1/messages/count_tokens, which returns the length of the prompt /v1/messages would generate from, so Claude Code can run against macMLX.

thinking set to disabled turns a thinking template's enable_thinking off, and budget_tokens is accepted and not enforced. count_tokens loads the model like a generation and waits behind one that is running. Fields Claude Code sends that macMLX does not act on, such as output_config, context_management, metadata, and cache_control, are accepted and ignored. Every Claude Code model alias has to be mapped to a local model, since an unmapped one requests a claude-* id that macMLX answers with a 404. This remains Messages API compatibility, not the full Anthropic API.

Verified

Released0.11.0

Reasoning round trip

When a client replays an earlier assistant turn's reasoning on chat completions, /v1/messages, or /v1/responses, v0.11.0 passes it to the chat template as that turn's reasoning_content, so a thinking model sees its own reasoning inside a tool loop.

Templates decide what they render: the Qwen3.x, Mellum2, and Gemma 4 templates render it only for the turns after the last user query, Gemma 4 only on those with tool calls, so at a new query prompt-cache reuse falls back to the end of the previous one. The encrypted_content and signature fields that carry it are the text in base64 behind a macmlx.r1. prefix, not encryption. Models on the stock vision path and the Ollama endpoints are out of scope, and a request without replayed reasoning renders exactly as before.

Verified

Released0.11.0

Xcode 27 and Foundation Models, checked end to end

For v0.11.0 a real macmlx serve was run behind Xcode 27's locally hosted model provider on Qwen3.6-27B-4bit, and behind Apple's ChatCompletionsLanguageModel on Qwen3.6-27B-4bit and Gemma 4 E4B: Xcode lists the downloaded models and holds a conversation, and respond, streamResponse, multi-turn sessions, tools, greedy sampling, and guided generation for the checked @Generable types work.

GET /v1/models now lists every chat model in the model directory, since Xcode reads an empty list as a failed connection, while a request with an Origin header still sees only the loaded model. @Guide(.pattern) is a 400, and on a thinking model greedy sampling can reason in a loop until the limit. Not checked: images, other models, what an app sees with no server running, and the Ollama endpoints; no generation quality is claimed beyond these runs.

Verified

Endpoint compatibility matrix

v0.11.0 endpoint families and their explicit boundaries
SurfaceEndpointsCompatibility boundary
OpenAI chatPOST /v1/chat/completionsCompatible; streaming supported
OpenAI ResponsesPOST /v1/responsesStateless: the whole conversation each turn; previous_response_id and item_reference items are a 400, hosted tools are ignored
OpenAI legacy completionsPOST /v1/completionsCompatible legacy completion shape
OpenAI model listingGET /v1/modelsCompatible listing of every chat model in the model directory; load/unload are macMLX extensions under /x/models
OpenAI embeddingsPOST /v1/embeddingsCompatible embeddings shape; model suitability still matters
AnthropicPOST /v1/messages, POST /v1/messages/count_tokensMessages API only, including streaming and thinking blocks; not the full Anthropic API
Ollama/api/version, /api/tags, /api/show, /api/chat, /api/generateSelected endpoints since v0.3.7; not a drop-in replacement
RerankPOST /v1/rerankMLXRerankers cross-encoders, Qwen3 rerankers, and Jina v3; bi-encoder cosine fallback
AudioPOST /v1/audio/transcriptions, POST /v1/audio/speechOpenAI-shaped; an output container macMLX cannot produce is refused, not substituted
Tool loopsOpenAI, Anthropic, and GUI MCP routesMulti-turn tool routing released in v0.6.0
Structured outputresponse_format: json_object or supported JSON SchemaNested, $ref, and range-bounded schemas; null, unions, pattern, and tool/VLM combinations return 400
API compatibility packlogit_bias, logprobs, top_logprobs, XTC, per-request LoRA, toolsUnsupported parameter combinations return 400
KV-cache quantizationkv_bits, kv_group_size, quantized_kv_startCompatible requests only; this does not quantize model weights

OpenAI-compatible chat example

Call the local server with an explicit model and message.

curl http://localhost:8000/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"your-mlx-model","messages":[{"role":"user","content":"Hello"}]}'

Official sources

  1. Xcode 27 and Foundation Models, checked end to end
  2. Xcode 27 and Foundation Models, checked end to end
  3. Xcode 27 and Foundation Models, checked end to end
  4. MCP client pool
  5. Integrated chat tool routing
  6. Local embeddings
  7. Rerank on MLXRerankers
  8. In-process speech to text and text to speech
  9. In-process speech to text and text to speech
  10. Eligibility-gated continuous batching
  11. Eligibility-gated continuous batching
  12. Foundation-Models-shaped JSON schemas
  13. Foundation-Models-shaped JSON schemas
  14. Foundation-Models-shaped JSON schemas
  15. KV-cache quantization
  16. KV-cache quantization
  17. OpenAI Responses API
  18. OpenAI Responses API
  19. Claude Code on /v1/messages
  20. Reasoning round trip
  21. Xcode 27 and Foundation Models, checked end to end