Use Kimi K2.6 and MiniMax M3 with opencode in Morocco — velqa.dev
Configure opencode to use Kimi K2.6 or MiniMax M3 through velqa.dev, payable in Moroccan dirhams (MAD). No international Visa card required.
Prerequisites
- opencode installed (
npm install -g opencode-aior via your package manager) - A velqa.dev API key (see the quickstart)
Configuration
opencode reads its config file from ~/.config/opencode/config.json (global) or ./opencode.json at your project root (takes precedence).
Create or edit this file:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"velqa": {
"npm": "@ai-sdk/openai-compatible",
"name": "Velqa",
"options": {
"baseURL": "https://api.velqa.dev/v1",
"apiKey": "{env:VELQA_API_KEY}"
},
"models": {
"kimi-k2.6": {
"name": "Kimi K2.6",
"limit": {
"context": 131072,
"output": 16384
}
},
"minimax-m3": {
"name": "MiniMax M3",
"limit": {
"context": 131072,
"output": 16384
}
},
"hy3": {
"name": "Hunyuan Hy3",
"limit": {
"context": 262144,
"output": 16384
}
},
"glm-4.7-flash": {
"name": "GLM-4.7 Flash",
"limit": {
"context": 200000,
"output": 16384
}
},
"deepseek-v4-flash": {
"name": "DeepSeek V4 Flash",
"limit": {
"context": 65536,
"output": 8192
}
}
}
}
},
"compaction": {
"auto": true,
"prune": true,
"reserved": 10000
}
}The limit block (context window + max output per model) and the compaction block are important: they tell opencode when to automatically compact a long session. compaction.prune drops stale tool outputs that are no longer relevant. Without them, context grows unbounded during an agentic session and eventually triggers Trop de tokens demandés. Reessaie plus tard. — while also burning through your quota faster. The context values match each model's real window (see velqa.dev/models).
Then export the environment variable (add it to your ~/.bashrc or ~/.zshrc):
export VELQA_API_KEY="sk-..."Alternatively, you can hardcode the key in the file (not recommended if the file is version-controlled):
"apiKey": "sk-..."Quick test
Launch opencode in your project:
opencodeType /models to check that the Velqa models appear in the list. Select kimi-k2.6 and ask a question — the response confirms the connection works.
Recommended models
| Model | Use case | Minimum plan |
|---|---|---|
kimi-k2.6 | Complex coding agent, long sessions | Dev (199 MAD) |
hy3 | General-purpose and agentic, excellent perf/price ratio | Starter (99 MAD) |
minimax-m3 | Code generation, refactoring | Dev (199 MAD) |
glm-4.7-flash | General chat, quick tasks — the most responsive | Starter (99 MAD) |
deepseek-v4-flash | High-volume, economical | Starter (99 MAD) |
Pricing in MAD
See velqa.dev/models for up-to-date prices in MAD per million tokens. Boost top-up rates are shown in dirhams directly in the dashboard.
