OCOCode mlx-bar

OpenCode v1.18.30 × MLXBar

Local Mac AI, inside OpenCode.

OCode mlx-bar is a minimal fork that leaves OpenCode's UI, agents, tools, MCP, and sessions intact, adding only MLXBar as a first-class provider.

Free · MIT License · ad-hoc signed · not notarized by Apple

OpenCodeUI · Agent · Tools
↓
provider / mlxbarminimal adapter
↓
MLXBar :11435OpenAI compatible
↓
Apple Siliconlocal inference
● connected · models discovered · stream ready

One provider. Nothing else rewritten.

A small delta is the quality bar. When MLXBar is not selected, observable behavior is intended to match OpenCode v1.18.30.

01 / UPSTREAM

Existing behavior stays

No changes to UI, keybindings, agents, prompts, tools, MCP, permissions, sessions, or retry.

02 / LIMITS

Native Auto Compaction

MLXBar's effective context and safe-input limits feed the existing OpenCode model metadata and compaction policy.

03 / FAILURE

Starts without MLXBar

Discovery is brief and bounded. An offline server cannot take down OCode or another provider.

Right where OpenCode already lists models.

There is no custom wizard or separate screen. Start MLXBar, then use the provider and model selectors you already know.

Dynamic discovery

Loads the current model inventory from GET /v1/models during startup.

Streaming chat

Uses the existing OpenAI-compatible SDK path for streaming responses and tool calling.

Local or LAN

Use the default localhost endpoint or supply a LAN base URL and token through normal provider settings.

No capability guessing

Vision, reasoning, and token limits are enabled only from explicit metadata—not model names.

Start MLXBar. Pick a model.

The default local setup needs no extra configuration. Use standard OpenCode provider settings only for token authentication or LAN access.

  1. Start MLXBarLoad a model and enable its OpenAI-compatible API.
  2. Open OCode mlx-barIt briefly probes /v1/models during startup.
  3. Select an MLXBar modelChoose mlxbar/<model> in the existing model selector.
{
  "provider": {
    "mlxbar": {
      "options": {
        "baseURL": "http://127.0.0.1:11435/v1",
        "apiKey": "YOUR_MLXBAR_TOKEN"
      }
    }
  }
}

Bounded, isolated, and explicit.

Host memory pressure and context overflow are different conditions, even for a local provider.

Ambiguous memory pressure stays intact

It maps to context overflow only when MLXBar explicitly marks it context-recoverable.

No invented limits

When a safe-input limit is absent, the adapter never substitutes a percentage heuristic.

Memory boundaries

Discovery is capped at 4 MiB and 10,000 models.

No secret logging

The adapter does not log API keys, authorization headers, prompts, or tool results.

First release, clearly defined.

OCode mlx-bar is free and open source. OpenCode's original MIT license and copyright notice are preserved.

Version
v1.18.30-mlxbar.1
Upstream base
OpenCode v1.18.30 · 3104c14
Release platform
macOS · Apple Silicon
Default endpoint
127.0.0.1:11435/v1
License
MIT
Developer
Yuki_Orita / 折田悠希

The macOS build is ad-hoc signed and not notarized by Apple. First launch may require manual approval in System Settings › Privacy & Security.