Command Code

The Command Code agent with your own provider: MafiaLLM models, billed to your balance.

Setup

Command Code takes custom providers in ~/.commandcode/providers.json (its “bring your own key” feature, in beta). List the models you want, with their limits from the model list:

~/.commandcode/providers.json:

{
  "provider": {
    "mafiallm": {
      "name": "MafiaLLM",
      "baseURL": "https://api.mafiallm.com/v1",
      "apiKey": "$MAFIA_KEY",
      "models": {
        "glm-5.3": { "name": "GLM 5.3", "contextWindow": 1000000, "maxOutput": 65536 },
        "kimi-k3": { "name": "Kimi K3", "contextWindow": 1000000, "maxOutput": 65536 }
      }
    },
    "mafiallm-claude": {
      "name": "MafiaLLM (Claude)",
      "api": "anthropic-messages",
      "baseURL": "https://api.mafiallm.com/anthropic",
      "apiKey": "$MAFIA_KEY",
      "models": {
        "claude-sonnet-5-5": { "name": "Claude Sonnet 5.5", "contextWindow": 1000000, "maxOutput": 64000, "reasoning": true },
        "claude-opus-5-5": { "name": "Claude Opus 5.5", "contextWindow": 1000000, "maxOutput": 128000, "reasoning": true }
      }
    }
  }
}

shell:

export MAFIA_KEY="sk-mf-…"
command-code
  1. Start Command Code and open /model.
  2. Pick a model under MafiaLLM or MafiaLLM (Claude).
  3. After editing the file, open /model again to reload it.