Skip to main content

llm-omlx

llm-omlx is a plugin for LLM that discovers and uses text, vision, and embedding models served by oMLX. It uses oMLX's OpenAI-compatible API while presenting every model through LLM's public interfaces.

Installation

Install the plugin into the same environment as LLM:

llm install llm-omlx

Point it at one oMLX server. When OMLX_API_BASE is unset, the plugin reads the host and port from the local oMLX settings.json (under OMLX_BASE_PATH, default ~/.omlx), so a server managed by the oMLX app on the same machine works with no configuration. The API key is optional when the server allows unauthenticated requests:

export OMLX_API_BASE=http://127.0.0.1:8000/v1  # optional when oMLX runs locally
export OMLX_API_KEY=your-key  # optional

You can also store a key under LLM's omlx alias or provide --key for an individual command. Explicit keys take precedence over the stored alias and environment variable.

Usage

Refresh discovery and list the canonical omlx/ model IDs:

llm omlx models --refresh
llm models | grep '^omlx/'

Run text and vision prompts, or create an embedding:

llm -m omlx/your-model "Hello"
llm -m omlx/your-vlm -a image.png "Describe this image"
llm embed -m omlx/your-embedding-model -c "Embed this"

Model IDs come directly from the configured server and are always exposed as omlx/<provider-id>.

Discovery and offline behavior

The plugin first reads GET /v1/models/status. Models classified by oMLX as llm, vlm, or embedding are registered as text, vision, or embedding models respectively. Helper, hidden, reranker, audio, MarkItDown, and unknown special models are excluded.

If the status endpoint returns 404 or 405, discovery falls back to GET /v1/models. In that fallback catalogue, IDs containing embed (case-insensitive) are classified as embeddings; all other IDs become text-only chat models. Vision capability is never guessed from a model name.

A sanitized catalogue is cached in LLM's user directory for the configured API base. Fresh cache entries avoid repeated discovery. A matching stale cache can keep model listing usable when the server is offline; llm omlx models --refresh attempts the server first and uses the matching stale cache only if refresh fails. No model filesystem paths or raw status documents are persisted.

Model capabilities

Generation models support streaming, reasoning parts, conversations, tools, and structured JSON schemas. Actual tool calling and schema enforcement still depend on the selected model, its chat template, and the oMLX grammar configuration.

Only models classified as vlm accept attachments. Supported image MIME types are:

  • image/png
  • image/jpeg
  • image/gif
  • image/webp

Images may come from LLM-supported files, URLs, or bytes. Audio and video are not supported. Embedding models accept text only; binary and oMLX multimodal embedding items are not supported.

Configuration

Variable Default Purpose
OMLX_API_BASE local oMLX settings.json, else http://127.0.0.1:8000/v1 The single oMLX endpoint. A bare origin is normalized to end in /v1.
OMLX_BASE_PATH ~/.omlx Where the local oMLX settings.json is read from when OMLX_API_BASE is unset.
OMLX_API_KEY unset Optional oMLX API key.
OMLX_TIMEOUT 90 Positive request timeout in seconds.
OMLX_EMBED_BATCH_SIZE 32 Positive default batch size for embedding requests.

Development

The project requires Python 3.10 or later and uses uv:

uv sync --locked --all-groups
uv lock --check
uv run ruff check .
uv run ruff format --check .
uv run pyright
uv run pytest
uv build
uv run twine check dist/*

Live acceptance tests are skipped by default. With an oMLX server running:

OMLX_API_BASE=http://127.0.0.1:8000/v1 \
OMLX_API_KEY=your-key \
uv run pytest --run-live -m live -q

See CONTRIBUTING.md for the contribution workflow.

License

Apache-2.0. See LICENSE.

Metadata

Release files for llm-omlx 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llm-omlx 0.1.0
File Size Uploaded Provenance Actions
llm_omlx-0.1.0.tar.gz 34.0 kB Without provenance Details for llm_omlx-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llm-omlx 0.1.0
File Interpreter ABI Platform Actions
llm_omlx-0.1.0-py3-none-any.whl Python 3 none any Details for llm_omlx-0.1.0-py3-none-any.whl

Total release size: 56.3 kB

Release files / llm_omlx-0.1.0.tar.gz

Download URL llm_omlx-0.1.0.tar.gz
Size 34.0 kB
Tags Source
SHA-256 checksum
How to use checksums
82c22ef75194b7c14b6986d04f9fc7fde6341eb6409ef0458d1fa02567e02cbc
BLAKE2b-256 checksum
How to use checksums
afe3799a2ae776c19942d3568087b62ae79729b697bc0dc88a1ba871707066d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.30 {"installer":{"name":"uv","version":"0.11.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / llm_omlx-0.1.0-py3-none-any.whl

Download URL llm_omlx-0.1.0-py3-none-any.whl
Size 22.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
91aaf4ec1b66dbd83e549e4be8a06f41e50477e128501fd6231d147c695c26f4
BLAKE2b-256 checksum
How to use checksums
3d920885e858068ac772d0e77eb7715f43f4d1685c49faef415700b422aec224
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.30 {"installer":{"name":"uv","version":"0.11.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for llm-omlx 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page