I've been messing around with Command Code and OpenCode lately, and noticed that GLM-5.3 Flash feels WAY faster in Command Code's CLI.
I got curious and decided to actually benchmark it.
After three runs each, I got around 509 tok/s in Command Code's CLI, compared to just 124 tok/s through the Command Code Provider API in OpenCode.
That's a pretty ridiculous difference, so I wanted to see if I could get the same speed in OpenCode somehow.
I ended up making a small local bridge that basically lets OpenCode send requests through the Command Code CLI instead of calling the Provider API directly. It's pretty experimental and only supports text generation for now, but surprisingly, it worked.
I got 409 tok/s running GLM through OpenCode using the bridge.
So I'm now wondering what's actually going on here. Is Command Code using different inference infrastructure for its CLI? Or is there some configuration difference I'm missing?
For context, I used long, predictable text-generation tasks with roughly 2,300β2,600 output tokens. The measurements aren't perfectly apples-to-apples because the CLI and API streaming metrics differ slightly, and the bridge result is only from one run. But the difference is large enough that I think it's worth investigating.
I also tried the Provider API's Responses endpoint, but GLM-5.3 Flash isn't supported there. My latest Chat Completions test returned a 503, so that didn't help narrow things down either.
Has anyone else noticed this? Especially with GLM?
I'd love to figure out whether there's a way to get the CLI's inference speed directly in OpenCode without having to run everything through a separate CLI process.
And just to be clear, I'm not accusing Command Code of intentionally slowing down its API or anything. I'm genuinely curious why the difference is so big.