Original video in Chinese.
Key Takeaway
- Kimi K2 advantage: Moonshot’s open-source 1T model has code generation and agentic capabilities between Claude 3.5 and 3.7, filling a gap in domestic models and enough to power agent products, with low API costs.
- Switching the Claude Code model: a simple method (API Key + terminal environment variables); Claude Code Router (install an npm package, configure JSON/commands, supports multiple providers such as OpenRouter).
- Principle and suggestion: AI programming tools are split into LLM (the brain) + Coding Assistant (the bridge/hands and feet). Kimi stimulates tool use; I recommend trying it, and I’m looking forward to a surprise from DeepSeek’s new model.
If you have trouble using Claude Code, then you can switch the model to Kimi K2 and it will still run just fine. And the result may really surprise you.
Kimi K2 is the latest model launched by Moonshot, open source, with 1T parameters. What I’m most interested in is its code generation and agentic capabilities.
Honestly, for domestic models, I’ve never really seen these two capabilities stand out. This has also caused domestic models to fall further and further behind in AI programming and agent products.
Until Kimi K2 appeared.
Foreign users are even more enthusiastic about this model than domestic users. They say K2 is another “DeepSeek-R1 moment.” The blog post by Kimi’s algorithm engineer has also attracted great interest from foreign users.
From my own experience, I feel K2’s capability is roughly between Claude 3.5 and Claude 3.7. To sum it up in one sentence: it is enough to drive agent products and can be used to get real work done.
Don’t think I’m rating it low. You have to understand that today, most agent products rely entirely on Claude models. For Kimi to fill this gap in domestic models is extremely impressive!
Hello everyone, welcome back to my channel. Modestly speaking, I’m one of the few creators in China who can explain both the Why and the How of AI clearly. What I provide is far more valuable than tutorials. Remember to follow. If you want to connect with me, come to our newtype community. This community has been running for 500 days, and more than 1,500 friends have joined as paying members.
Back to today’s topic: using Kimi K2 to drive Claude Code.
There are many ways to replace the model in Claude Code. I’ll introduce two. Let’s start with the simplest one for most people.
Step 1: go to Moonshot’s official website, register an account, and then generate an API Key. If you plan to use it long term, you can add some funds. I added 50 yuan myself, which counts as Tier 1. Kimi’s API fees are very low, and compared with Claude, it’s basically a bargain. Everyone can use it boldly.
Step 2: go to the terminal and run these two commands. Their job is to set environment variables and switch the model invocation channel to Moonshot’s side.
After setting it up, type claude to start Claude Code. At this point, the model has already been switched to K2.
The second method is a little more involved. But the advantage is that you can switch between all kinds of models.
The Claude Code Router project is basically a router that lets you configure models however you like and make custom settings.
It supports many model providers, including OpenRouter, DeepSeek, Ollama, Gemini, and more. Kimi’s official API is supported too.
It’s also pretty simple to use. Run this command to install the npm package. Then open the config.json file and configure Kimi’s official API like I did. If you don’t want to fill in a config file, that’s also fine. Type this ccr start command. Then, according to its prompts, enter the provider name, url, api key, and model name, and you can finish the configuration. Finally, type ccr code and you can use it normally.
Seeing this, some people may be wondering: after switching the model, why can Claude Code still work?
Let me give a simple and blunt analogy: Amuro can pilot a Gundam, and so can Char! As long as the pilot is strong enough, they can all handle it.
The AI programming tools we use contain two parts: the large language model (LLM), and the Coding Assistant.
Programming doesn’t just require a smart brain; it also requires very strong hands-on ability. For example, finding the files you need in such a huge codebase, or just those few lines of code.
The LLM can’t do these things. Think about it: its full name is large language model—it can think and speak, but it just can’t act with its hands. So it needs the Coding Assistant to help, providing and operating various tools.
So whether an AI programming tool is good or not depends on two things. On one hand, it depends on the model’s own capabilities. That is the brain. Its intelligence, such as logical rigor and the ability to understand complex problems, determines the upper limit of the tool’s usefulness.
On the other hand, it depends on the Coding Assistant. It is the bridge between the LLM and the development environment. It needs to act as the eyes, for example by knowing what the project file structure looks like and what dependencies there are, and so on. It also needs to act as the hands and feet, such as manipulating files and executing terminal commands. And all of this depends heavily on tool use.
Claude Code is so powerful precisely because both of these aspects are strong, and they work together extremely well.
Now the model has been switched to Kimi K2. Since the model already knows how to use tools from the pretraining stage, the Kimi team designed a workflow that lets the model synthesize its own data and learn by itself, ultimately successfully stimulating its tool-use capability.
I also said yesterday in the Knowledge Planet that domestic models had been quiet for so long, and finally one that can really fight has appeared. I recommend everyone to try it if you have the conditions.
Also, after seeing Kimi K2’s performance, I’ve started looking forward to DeepSeek’s new model. I hope it brings a big surprise.
OK, that’s all for this episode. If you want to learn about AI, want to become a super individual, and want to find like-minded people, come join our newtype community. See you in the next episode!