[UNTESTED] [gregbarbosa/fm-proxy] 1 endpoint(s)
ChatGPT
API Proxy/ChatGPT
2,129 characters
Status: [UNTESTED]
Endpoints found:
http://127.0.0.1:1977/v1/chat/completions
Source: https://github.com/gregbarbosa/fm-proxy
# fm-proxy
**An OpenAI-compatible API endpoint for the Apple Foundation Models CLI (`fm`).**
macOS 27.0 ships a beta `fm` CLI to run Apple Foundation Models
on-device (`system`) and on Apple's Private Cloud Compute (`pcc`). It includes a Chat Completions local server (`fm serve`), but tool-calling schema support still has a couple of rough edges and streaming token-usage reporting requires an opt-in flag most clients never set.
`fm-proxy` sits in front of `fm serve` to give you an **OpenAI-compatible Chat Completions endpoint**. Point any OpenAI client at the local URL and use Apple's models with no code changes.
> ⚠️ **Beta.** This is built on macOS 27.0 **beta** so expect breaking changes with system updates.
## What it includes
- **Chat completions** — streaming and non-streaming.
- **Fixed tool / function calling** — Accepts standard OpenAI `tools`, including rich nested schemas. `fm serve` decodes nested objects, arrays-of-objects, and (as of Beta 4) object chains of any depth natively; the proxy only falls back to a JSON-string round-trip for the one shape still verified broken upstream (`array<array<object>>`), best-effort.
- **Fixed structured output** — `response_format: {type:"json_schema",...}` works with plain, undecorated OpenAI/pydantic-style schemas (including `$defs`/`$ref`, the shape virtually every real schema generator emits). `fm serve` requires its own `title`/`x-order`/`required`/`additionalProperties` dialect on every object schema reached through `$defs`; the proxy injects it automatically so ordinary client schemas just work.
- **Fixed token counts** — `fm serve`'s non-streaming responses now report real `prompt_tokens` (fixed in Beta 3) and are passed through untouched. Streaming responses only get real usage when the request opts in via `stream_options.include_usage:true`, which real clients rarely set, so the proxy forces that flag upstream on every streaming request and relays fm serve's own real usage back — falling