Skip to content

Instantly share code, notes, and snippets.

@littlemac51
littlemac51 / README.md
Created February 26, 2026 17:09
OpenClaw system prompt reorder proxy for prefix cache optimization — workaround for openclaw/openclaw#27732

Prompt Reorder Proxy

Lightweight HTTP proxy that sits between OpenClaw and a local model server (mlx-openai-server). Reorders system prompt sections so static content comes first and dynamic content comes last, maximizing prefix cache hit rates.

Architecture

OpenClaw → reorder-proxy (:8081) → mlx-openai-server (:8080)