This repository contains bash scripts for installing OpenCode and for running it with local LLM's.
The bin directory contains the following bash scripts:
bin/
└── download_install.sh
Enter the bin directory and type the following command.
# Command
./download_install.shEdit the opencode.json file:
# Edit
~/.config/opencode/opencode.jsonConfigure the local LLM's.
The ID name values here refer to the config.yaml configuration file in ed_llama-swap
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"llama-swap": {
"npm": "@ai-sdk/openai-compatible",
"name": "llama-swap (Local)",
"options": {
"baseURL": "http://127.0.0.1:8080/v1"
},
"models": {
"qwen3.6-27b-q4": {
"name": "qwen3.6-27b-q4",
"modalities": {
"input": ["text", "image"],
"output": ["text"]
},
"limit": {
"context": 163840,
"output": 32768
}
},
"qwen3.6-27b-q5": {
"name": "qwen3.6-27b-q5",
"modalities": {
"input": ["text", "image"],
"output": ["text"]
},
"limit": {
"context": 131072,
"output": 32768
}
},
"qwen3.6-35b-a3b-q4": {
"name": "qwen3.6-35b-a3b-q4",
"modalities": {
"input": ["text", "image"],
"output": ["text"]
},
"limit": {
"context": 196608,
"output": 32768
}
},
"qwen3.6-35b-a3b-q5": {
"name": "qwen3.6-35b-a3b-q5",
"modalities": {
"input": ["text", "image"],
"output": ["text"]
},
"limit": {
"context": 114688,
"output": 32768
}
},
"qwen3-vl-30b-a3b-instruct-q4": {
"name": "qwen3-vl-30b-a3b-instruct-q4",
"modalities": {
"input": ["text", "image"],
"output": ["text"]
},
"limit": {
"context": 155648,
"output": 32768
}
},
"qwen3-vl-32b-instruct-q4": {
"name": "qwen3-vl-32b-instruct-q4",
"modalities": {
"input": ["text", "image"],
"output": ["text"]
},
"limit": {
"context": 49152,
"output": 32768
}
},
"gemma-4-12b-it-q8": {
"name": "gemma-4-12b-it-q8",
"modalities": {
"input": ["text", "image"],
"output": ["text"]
},
"limit": {
"context": 131072,
"output": 32768
}
},
"gemma-4-26b-a4b-it-q5": {
"name": "gemma-4-26b-a4b-it-q5",
"modalities": {
"input": ["text", "image"],
"output": ["text"]
},
"limit": {
"context": 196608,
"output": 32768
}
},
"gemma-4-31b-it-q4": {
"name": "gemma-4-31b-it-q4",
"modalities": {
"input": ["text", "image"],
"output": ["text"]
},
"limit": {
"context": 98304,
"output": 32768
}
}
}
}
},
"model": "llama-swap/qwen3.6-27b-q5"
}