This folder backs up local OpenCode agentic coding profiles. The default profile is still the 48 GB Apple Silicon MacBook Pro LM Studio setup. The Ubuntu RTX 3090 Lucebox setup is opt-in and must be selected with the profile/config environment variables shown below.
Default active profile:
- LM Studio local server at
127.0.0.1:1234 - Fast default OpenCode model:
lmstudio/local-fast - Qwen coding OpenCode model:
lmstudio/local-coder - Fast model source:
mlx-community/Llama-3.2-3B-Instruct-4bit, loaded aslocal-fast - Chat/coding model source:
froggeric/qwen3.6-27b-mlx-8bit, loaded aslocal-coder - Local model path:
froggeric/Qwen3.6-27B-MLX-8bit - MLX/safetensors 8-bit, about
28 GB, about35 GBminimum system memory - OpenCode Qwen context/output:
32768/4096 - OpenCode fast context/output:
32768/1024 - Embedding model:
text-embedding-nomic-embed-text-v1.5 - OpenCode MCPs:
context7,gh_grep,local_code_index,local_dev_tools - Default agent:
fast, a no-tool quick-answer route that prevents local Qwen from hanging on trivial turns - Qwen agents:
build,plan,indexer,codebase-researcher,debugger,test-runner,code-reviewer,doc-researcher,security-auditor - Slash commands:
/explain,/research,/debug,/test,/review,/docs,/security,/index,/implement - LSP entries:
typescript,eslint
Model weights are not copied here. The repo stores model identifiers, runtime package metadata, scripts, MCPs, and docs; LM Studio and Lucebox model directories remain the places that own model downloads and updates.
Default Mac profile variables live in:
/Users/oiqbal/AndroidStudioProjects/llm-opencode/config/profile-48gb.envEdit that file first when changing the target username/home, chat model, model path, context, output tokens, LM Studio host/port, embedding model, OpenCode paths, RAG database, launch env, LSP commands, or LM Studio MLX runtime package URLs/checksums.
Then update config/opencode.json to match and run:
/Users/oiqbal/AndroidStudioProjects/llm-opencode/scripts/validate-profile-sync.shThe old 24 GB profile is preserved as reference at config/profile-24gb.env and reference/PLAN-24GB-legacy.md.
An opt-in Ubuntu/NVIDIA profile is available for an i9 13th gen, 96 GB RAM, RTX 3090 workstation:
- Setup plan:
PLAN-96GB-UBUNTU-NVIDIA.md - Profile:
config/profile-96gb-ubuntu-nvidia.env - OpenCode config:
config/opencode-96gb-ubuntu-nvidia.json - Main model runtime: Lucebox DFlash through an autowake proxy on
127.0.0.1:18080 - Main model:
lucebox/luce-dflashbacked byQwen3.6-27B-Q4_K_M.gguf+dflash-draft-3.6-q4_k_m.gguf - Rollback model:
lmstudio/local-coder, kept configured but not auto-loaded in normal mode - Embeddings: LM Studio
text-embedding-nomic-embed-text-v1.5on127.0.0.1:1234, loaded with--gpu off --ttl 3600 - Default Lucebox context:
49152 - Default Lucebox output cap:
2048 - Lucebox prefix cache: disabled with
--prefix-cache-slots 0for stability - Idle behavior: the proxy starts the real Lucebox backend on demand at
127.0.0.1:18081and stops it after 1 hour without API traffic - Request guard: the proxy clamps oversized chat
max_tokensvalues to the configured Lucebox output cap
Use it explicitly with:
OPENCODE_BACKUP_PROFILE="$PWD/config/profile-96gb-ubuntu-nvidia.env" \
OPENCODE_BACKUP_CONFIG="$PWD/config/opencode-96gb-ubuntu-nvidia.json" \
scripts/validate-profile-sync.shThe default backup remains the 48 GB Mac profile.
- Do not manually swap the loaded LM Studio model for OpenCode. The setup requires stable aliases:
local-fast,local-coder, and the embedding model must all be visible from/v1/models. - Qwen stays the protected 48 GB
local-coderimplementation model, but it is no longer the default interactive agent. The defaultfastroute handles short no-tool turns quickly. - The
buildagent denies MCP tool namespaces by default to avoid repeatedlocal_code_indexandlocal_dev_toolsloops. Use/researchfor MCP-backed discovery and/implementorBuildfor Qwen-backed edits. - Qwen must receive the
<|think_off|>prelude fromconfig/qwen36-instructions.md;/no_thinkwas not enough for this LM Studio template. /explainis intentionally fast and no-tool. For exact repository evidence, use/research.
Follow the full runbook in PLAN-96GB-UBUNTU-NVIDIA.md. The short path is:
cd /home/ohmz/StudioProjects/llm-opencode
export OPENCODE_BACKUP_PROFILE="$PWD/config/profile-96gb-ubuntu-nvidia.env"
export OPENCODE_BACKUP_CONFIG="$PWD/config/opencode-96gb-ubuntu-nvidia.json"
scripts/install-opencode-config-linux.sh
scripts/ensure-lucebox-linux.sh
scripts/install-lucebox-service-linux.sh
scripts/ensure-lmstudio-models-linux.shUseful health checks:
curl -sS http://127.0.0.1:18080/health | jq .
systemctl --user status lucebox-dflash-proxy.service lucebox-dflash.service --no-pager
lms ps
opencode run --model lucebox/luce-dflash --format json 'Reply exactly: OK'Normal Ubuntu mode should show only the embedding model in LM Studio. The LM Studio Qwen chat model
is rollback-only and should be loaded only with LMSTUDIO_LOAD_CHAT_ROLLBACK=1.
/Users/oiqbal/AndroidStudioProjects/llm-opencode/scripts/install-opencode-config.sh
/Users/oiqbal/AndroidStudioProjects/llm-opencode/scripts/ensure-lmstudio-models.sh
/Users/oiqbal/AndroidStudioProjects/llm-opencode/scripts/seed-rag.shRestart OpenCode Desktop after installing the config.
If OpenCode is stuck in a long running turn, quit it before reinstalling. Then run ensure-lmstudio-models.sh and verify that /v1/models includes local-fast, local-coder, and text-embedding-nomic-embed-text-v1.5 before reopening OpenCode.
If LM Studio's MLX runtime is missing its signed CPython vendor layer, run:
/Users/oiqbal/AndroidStudioProjects/llm-opencode/scripts/repair-lmstudio-mlx-runtime.shStatic validation, useful before running on a 48 GB host:
jq . /Users/oiqbal/AndroidStudioProjects/llm-opencode/config/opencode.json >/dev/null
/Users/oiqbal/AndroidStudioProjects/llm-opencode/scripts/validate-profile-sync.sh
SMOKE_SKIP_HARDWARE=1 SMOKE_SKIP_LMSTUDIO=1 SMOKE_SKIP_LAUNCHCTL=1 /Users/oiqbal/AndroidStudioProjects/llm-opencode/scripts/smoke-test.shFull validation on the 48 GB Mac:
/Users/oiqbal/AndroidStudioProjects/llm-opencode/scripts/smoke-test.shThe full smoke test follows the active profile. On the Mac profile it loads the 32K local-fast and local-coder aliases, verifies fast no-tool generation, and keeps direct Qwen generation opt-in with SMOKE_QWEN_GENERATION=1. On the Ubuntu Lucebox profile it checks the Lucebox autowake proxy and chat path, keeps LM Studio embedding-only, exercises local MCPs, checks remote MCP reachability, and validates the OpenCode agent/command/LSP shape.
For the Ubuntu RTX profile, always pass the profile and config explicitly:
OPENCODE_BACKUP_PROFILE="$PWD/config/profile-96gb-ubuntu-nvidia.env" \
OPENCODE_BACKUP_CONFIG="$PWD/config/opencode-96gb-ubuntu-nvidia.json" \
scripts/smoke-test.shprompt + max_tokens exceeds context window: the Ubuntu profile should be49152context and2048output. Reinstall withscripts/install-opencode-config-linux.shand restart the stuck OpenCode session if the TUI already received the error.- OpenCode appears stuck, GPU usage drops, and Lucebox logs show
snapshot_longer_than_prompt: prefix cache must be disabled. Confirm the backend command includes--prefix-cache-slots 0, then reinstall/restart withscripts/install-lucebox-service-linux.shand retry the OpenCode prompt. - First prompt after idle is slow: expected.
/healthdoes not wake the model, but/v1/*and/propsstartlucebox-dflash.serviceand reload the model onto the RTX 3090. - LM Studio is using VRAM in normal mode: run
scripts/ensure-lmstudio-models-linux.sh. It unloadslocal-coderunlessLMSTUDIO_LOAD_CHAT_ROLLBACK=1is set and reloads only the embedding model with--gpu off --ttl 3600. - Local indexing is noisy: set
OPENCODE_INDEX_BACKGROUND=0in the active profile to disable background indexing, or increaseOPENCODE_INDEX_BACKGROUND_SECONDSandOPENCODE_INDEX_AUTO_SYNC_SECONDSabove300. - Repeated shell warning
ohmzai: syntax error: unexpected end of fileis an unrelated shell environment issue. It is noisy but did not block the OpenCode/Lucebox validation.
/Users/oiqbal/AndroidStudioProjects/llm-opencode/scripts/backup-current-setup.shThat command refuses to copy a live OpenCode config whose model does not match the active profile unless BACKUP_ALLOW_PROFILE_MISMATCH=1 is set.