// opencode settings for this server, tested with opencode 1.18.26 and 2.0.32 (the agentic results in evidence/ used // 1.18.26). Merge the provider and the compaction block into your opencode.jsonc, then pick // "Flash-Next Coder (MLX, local)". // // context 32768 serve.sh's window. The server refuses only a prompt that fills it; a reply that would run // past it is cut at the window. // output 8192 larger and opencode 1.18.26 compacts below what a compacted session already holds; smaller // and xhigh reasoning runs out of room on a hard turn. // input unset on purpose: opencode 1.18.26 then compacts at context - output = 24576 tokens and // ignores reserved. // reserved 8192 opencode 2.0.32 compacts at context - reserved = 24576 tokens. (reserved 24576 makes it compact // at 8192 tokens, below the ~12K-token base prompt, before every turn.) After a compaction a // session holds the base prompt, the summary and up to 8192 recent tokens. // prune used by opencode 1.18.26 only. // // The server applies xhigh reasoning to every request (serve.sh) and ignores a request's reasoningEffort; // enable_thinking does reach it. It checks no API key. { "$schema": "https://opencode.ai/config.json", "provider": { "flash-next-mlx": { "npm": "@ai-sdk/openai-compatible", "name": "Flash-Next Coder (MLX, local)", "options": { "baseURL": "http://127.0.0.1:8088/v1", "apiKey": "local" }, "models": { "local": { "name": "Qwen3.8-Flash-Next Coder (MLX)", "limit": { "context": 32768, "output": 8192 }, "reasoning": true, "options": { "reasoningEffort": "xhigh", "chat_template_kwargs": { "preserve_thinking": true } }, "variants": { "off": { "chat_template_kwargs": { "enable_thinking": false, "preserve_thinking": true } } } } } } }, "compaction": { "reserved": 8192, "prune": true, "preserve_recent_tokens": 8192 } }