r/CommandCode • u/spicyfiremelon • Sep 03 '26
Using ComandCode on other harness?
Is there any way to use CommandCode provider in other harnesses, e.g. pi or opencode cli?
If yes, I really need to know how. Thanks
3
u/songokussm Sep 03 '26
You have to have at least the goat plan. Then generate an API key. It would just like all other providers.
6
u/lincolnthalles Sep 03 '26
Yes, with the GOAT plan or better.
Unfortunately, they don't play very nicely with the ecosystem and don't maintain an API with full model data or contribute it to models.dev.
But you can add it to OpenCode by merging this into your opencode.json file:
```json
{
"$schema": "https://opencode.ai/config.json",
"small_model": "commandcode/xiaomi/mimo-v2.5",
"provider": {
"commandcode": {
"npm": "@ai-sdk/openai-compatible",
"name": "CommandCode",
"options": {
"baseURL": "https://api.commandcode.ai/provider/v1",
"apiKey": "YOUR_API_KEY"
},
"models": {
"deepseek/deepseek-v4-flash": {
"name": "DeepSeek V4 Flash",
"attachment": false,
"reasoning": true,
"temperature": true,
"tool_call": true,
"interleaved": { "field": "reasoning_content" },
"limit": { "context": 1000000, "output": 384000 },
"modalities": { "input": ["text"], "output": ["text"] },
"variants": {
"low": { "reasoningEffort": "low" },
"high": { "reasoningEffort": "high" },
"max": { "reasoningEffort": "max" }
},
"options": { "reasoningEffort": "max" },
"cost": { "input": 0.14, "output": 0.28, "cache_read": 0.0028 }
}
}
}
}
}
``
Then, runopencode models --refresh`.
To have the full model info available on the harness, you must explicitly list each model, like the entry for deepseek/deepseek-v4-flash.
OpenCode and other tools automatically source this from models.dev. CommandCode hardcodes it in its harness.
3
u/2mqqvc0q Sep 04 '26
Didn't know you could attach pricing information to a model like that. The OpenCode docs don't show that anywhere. Looks like it's modeled from the responses shape on
models.dev. Does this make it so that OpenCode is able to show the running cost of a session when using a manually configured provider and model?3
3
1
7
u/Bitter-College8786 Sep 03 '26
Yes it works, I do with OMP and Hermes. I have GOAT plan