
The project's opencode.jsonc can go into the repository. Whoever clones it gets the MozOut provider, the models and the starting model ready. The key stays out: each person uses their own, in a variable with the same name.
What goes into the file
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"api": {
"npm": "@ai-sdk/openai-compatible",
"name": "MozOut",
"options": {
"baseURL": "https://api.mozout.co.mz/v1",
// The key comes from the MOZOUT_API_KEY variable: each person uses their own.
"apiKey": "{env:MOZOUT_API_KEY}"
},
"models": {
"moonshotai/kimi-k2.7-code": { "name": "Kimi K2.7 Code", "limit": { "context": 262144, "output": 16000 } },
"deepseek-ai/deepseek-v4-pro": { "name": "DeepSeek V4 Pro", "limit": { "context": 1048576, "output": 16000 } },
"zai-org/glm-5.2": { "name": "GLM 5.2", "limit": { "context": 1048576, "output": 16000 } },
"deepseek-ai/deepseek-v4-flash": { "name": "DeepSeek V4 Flash", "limit": { "context": 1048576, "output": 16000 } }
}
}
},
"model": "api/moonshotai/kimi-k2.7-code"
}
Name it opencode.jsonc and put it at the root of the project. The comment is only accepted in a .jsonc file. OpenCode finds the file when someone opens it in that folder or in a subfolder.
What each person does
|
|
|
Anyone without the variable gets a 401, because OpenCode sends an empty key. Nobody else is affected.
One key per person
Each key has a name and can have a spending limit and a list of IPs: see creating an API key. With one key per person, if someone leaves the team or a key is exposed, you revoke only that one and everyone else keeps working.
When the project file and the global file disagree
OpenCode joins the two. When the same setting is in both, the project one wins. So, if the shared file has "model", that is everyone's starting model in that project. Each person can still change it while working with /models.
| Before the first commit, check that the file has no prod_ or sandbox_ in it. A key that went to Git must be revoked, even if you delete it in the next commit, because it stays in the history. See what to do, in the right order. |
| Kilo Code is different: a project file does not read variables. See why the key only works in the global kilo.jsonc. |
|
Want your team coding with our models? Visit the Coding with AI page. See Coding with AI |
RECOMMENDED PRODUCT Web hosting with cPanel Domain and SSL included, daily backups and the panel you already know. from $6.60/mo (3-year plan, with coupon) See plans |











