InertiaRSS Track and read blogs, news, and tech you care about
Read Original Open in InertiaRSS

Recommended Feeds

博客园 - 司徒正美
V
V2EX
T
Tailwind CSS Blog
有赞技术团队
有赞技术团队
aimingoo的专栏
aimingoo的专栏
Apple Machine Learning Research
Apple Machine Learning Research
IT之家
IT之家
Blog — PlanetScale
Blog — PlanetScale
A
About on SuperTechFans
月光博客
月光博客
T
The Blog of Author Tim Ferriss
宝玉的分享
宝玉的分享
Martin Fowler
Martin Fowler
博客园 - 聂微东
The GitHub Blog
The GitHub Blog
V
Visual Studio Blog
WordPress大学
WordPress大学
酷 壳 – CoolShell
酷 壳 – CoolShell
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI

阮一峰的网络日志

科技爱好者周刊(第 396 期):互联网通信的替代方案 科技爱好者周刊(第 396 期):互联网通信的替代方案 - 阮一峰的网络日志 科技爱好者周刊(第 395 期):软件开发的第三种方式 科技爱好者周刊(第 395 期):软件开发的第三种方式 - 阮一峰的网络日志 科技爱好者周刊(第 393 期):脑腐状态 科技爱好者周刊(第 392 期):axios 投毒与好莱坞式骗术 科技爱好者周刊(第 391 期):AI 的贫富分化 科技爱好者周刊(第 390 期):没有语料,大模型就是智障 套壳中国大模型撑起500亿美元估值?扒一扒 Cursor 的"套壳"疑云 科技爱好者周刊(第 389 期):未来如何招聘程序员 科技爱好者周刊(第 388 期):测试是新的护城河 零安装的"云养虾":ArkClaw 使用指南 科技爱好者周刊(第 387 期):你是领先的 科技爱好者周刊(第 386 期):当外卖员接入 AI 字节全家桶 Seed 2.0 + TRAE 玩转 Skill 科技爱好者周刊(第 385 期):马斯克害怕中国车企吗? 智谱旗舰 GLM-5 实测:对比 Opus 4.6 和 GPT-5.3-Codex 科技爱好者周刊(第 384 期):为什么软件股下跌 科技爱好者周刊(第 383 期):你是第几级 AI 编程 Kimi 的一体化,Manus 的分层 科技爱好者周刊(第 382 期):独立软件的黄昏 AI native Workspace 也许是智能体的下一阶段 科技爱好者周刊(第 381 期):中国 AI 大模型领导者在想什么 科技爱好者周刊(第 380 期):为什么人们拥抱"不对称收益" 科技爱好者周刊(第 379 期):《硅谷钢铁侠》摘录 我如何用 AI 处理历史遗留代码:MiniMax M2.1 升级体验 科技爱好者周刊(第 378 期):预测是新的互联网热点 科技爱好者周刊(第 377 期):14万美元的贫困线 科技爱好者周刊(第 376 期):太空数据中心的争议 科技爱好者周刊(第 375 期):一扇门的 Bug 终于有人做了 Subagent,TRAE 国内版 SOLO 模式来了 科技爱好者周刊(第 374 期):6GHz 的问题 VS Code 使用国产大模型 MiniMax M2 教程 科技爱好者周刊(第 373 期):数据模型是新产品的核心 科技爱好者周刊(第 372 期):软件界面如何设计 大模型比拼:MiniMax M2 vs GLM 4.6 vs Claude Sonnet 4.5 科技爱好者周刊(第 371 期):一个乐观主义者的专访 科技爱好者周刊(第 370 期):正确的代码高亮 错误处理:异常好于状态码 科技爱好者周刊(第 369 期):Tim 与罗永浩的对谈 科技爱好者周刊(第 368 期):不要这样管理软件团队 一天之内,智谱和 Anthropic 都发了最强编程模型 科技爱好者周刊(第 367 期):Nano Banana 的几个妙用 科技爱好者周刊(第 366 期):旧金山疯狂的 AI 广告 科技爱好者周刊(第 365 期):流量变现正在崩塌 科技爱好者周刊(第 364 期):最难还原的魔方 科技爱好者周刊(第 363 期):最好懂的神经网络解释 科技爱好者周刊(第 362 期):GitHub 工程师谈系统设计 科技爱好者周刊(第 361 期):暗网 Tor 安全吗? 科技爱好者周刊(第 360 期):Dan Wang 的新书
Domestic Large Model Integration with Claude Code Tutorial: Taking Doubao-Seed-Code as an Example
阮一峰 · 2025-11-11 · via 阮一峰的网络日志

I.

Domestic large models are booming, with new models emerging constantly. Have you been using them?

Many people are accustomed to existing models and are reluctant to try new ones, which is really a pity.

My approach is to try every new model and experience the latest training results. Moreover, during promotional periods, there are often discounts, so why not take advantage of them?

Today, I'll share how I integrated domestic large models into Claude Code.

As you know, Claude Code is currently the most popular and widely recognized AI terminal with the strongest functionality, but it has restrictions for Chinese users. Therefore, we need to replace its underlying model.

Using my method, it only takes a few minutes to easily and quickly integrate various domestic large models, providing a smooth experience.

Recently, DouBao, owned by ByteDance, has just released its latest programming model Doubao-Seed-Code

I'll use it to demonstrate and also test this model.

II.

The method I want to share doesn't affect Claude Code itself; it can still be used normally.

That is to say, executing claude command still calls the original Claude Sonnet 4.5 model.


$ claude

I will add a new claude-doubao command, and after executing it, the underlying model will switch.


$ claude-doubao

At this point, Claude Code still has all its functions, but the model used has become Doubao-Seed-Code.

The two commands mentioned above can be used simultaneously without interfering with each other. You can also continue to add other models, each with its own call command, making it the most convenient to test new models.

III.

Before we begin, let me briefly introduceDoubao-Seed-CodeGreat domestic models deserve good promotion.

It belongs to the Doubao Large Model series, and is part of that series.The first model specifically designed for programming reasoningThat is to say, this is ByteDance's first release of a programming model.

According toSWE-bench evaluationIt, combined with Trae, another smart IDE product under ByteDance, ranks first on the SWE-Bench-Verified leaderboard.

I am very interested in this model, mainly for three reasons.

(1) It is the main model promoted by major companies, with guaranteed quality, performance, and response speed.

(2) It natively compatible with Anthropic API, canSeamlessly access Claude Code without any adjustmentsIt's a great alternative to foreign models.

(3) It's cheap, and there is one nowCoding PlanActivities can be paid monthly via API. For general usage, the first month only costs 9.9 yuan (40 yuan/month renewal), and the official promotion is "the lowest price in the country."

Everyone canVolcano ArkTurn on this modelAPI Key, to be used later.

, four,

, let's demonstrate how to quickly integrate Doubao-Seed-Code with Claude Code.

, if you have already installed Claude Code, the following method will not affect your normal usage.

, if you haven't installed Claude Code but want to try its Claude Sonnet 4.5 model, you can follow the official documentation to install it, which doesn't conflict with the following method.

, changing the underlying model only requires three steps and can be done in minutes.

, first step, create a new project directory claude-model and install a separate Claude Code inside.


$ mkdir ~/claude-model
$ cd ~/claude-model
$ npm init -y
$ npm install @anthropic-ai/claude-code

Then, create a subdirectory .claude-doubao to store the Doubao configuration files and cache.


$ mkdir .claude-doubao

Next step, create a subdirectory bin to store executable scripts.


$ mkdir ~/claude-model/bin

Then, add this bin directory to the PATH variable so the system can find the commands inside.

PATH For setting the __JHSNS_SEG_efa7c0ee_58__ variable, on macOS, you can modify the ~/.bash_profile file, and on Linux, you can modify the ~/.bashrc file, roughly like this.


export PATH="$HOME/claude-model/bin:$PATH"

After making the changes, don't forget to restart the terminal.

Third step, in the bin directory created in the previous step, create a directory namedclaude-doubaoThe script used to call the Doubao model.


$ touch ~/claude-model/bin/claude-doubao

In thisclaude-doubaoIn the script, input the following content.


#!/usr/bin/env bash
# Wrapper for Claude Code CLI using Doubao API

CLAUDE_BIN="$HOME/claude-model/node_modules/.bin/claude"

# Inject API credentials
export ANTHROPIC_AUTH_TOKEN="YOUR_DOUBAO_API_KEY"
export ANTHROPIC_BASE_URL="https://ark.cn-beijing.volces.com/api/compatible"
export ANTHROPIC_MODEL="doubao-seed-code-preview-latest"
export API_TIMEOUT_MS=3000000

# Keep a separate config dir (optional)
export CLAUDE_CONFIG_DIR="$HOME/claude-model/.claude-doubao"

exec "$CLAUDE_BIN" "$@"

Note that the API Key in the script above should be filled in with your own obtained Key. Also, the model name and URL may change, so it's best to check the latest official documentation.

Then, make it an executable script.


$ chmod +x ~/claude-model/bin/claude-doubao

That completes all the steps, and you can start using it.

Let's test it first to see if Claude Code is working properly.


$ claude-doubao --version

From now on, when calling the Doubao-Seed-Code model, useclaude-doubaoCommand; invoke the original Claude Code, useclaudeCommand.


# 调用 Doubao-Seed-Code
$ claude-doubao

# 调用原始模型
$ claude

The method above is general and other models can also be added this way.

V.

Next, we will use Claude Code to call the Doubao-Seed-Code model and test its performance.

Back in the day, there was a famous game called "Space Invaders," which most of us have played. It's where you shoot bullets from a fighter jet to take down an alien fleet.

I let Doubao-Seed-Code generate this game.

First, create a new project directoryspace-invaders, Start Claude Code in this directory (usingclaude-doubaoCommand).


$ mkdir space-invaders
$ cd space-invaders
$ claude-doubao

Then, enter the prompt, "Implement Space Invaders on a webpage using HTML and JavaScript."

Write an HTML and JavaScript page implementing space invaders

The model's thought steps will continuously scroll on the screen, taking about two or three minutes, and all files will be generated in the space-invaders directory.

Above is the screenshot of the browser's webpage. I made no modifications, and the first generation was immediately playable without any errors. All operations were normal, which is satisfactory.

You can see the generated HTML source code hereand you can copy it over, open it in a browser to play around with it.The complete dialogue of the model can be found here..

Next, I also tested having it generate an SVG image of a "pelican riding a bicycle." Everyone can see the effect for themselves.

VI.

In summary, after integrating Claude Code with Doubao-Seed-Code, it performs very smoothly with fast response times, and the experience is indistinguishable from the native model.

As for the Doubao-Seed-Code programming model itself, it is generally satisfying: step-by-step reasoning is very clear, with short thinking time, high completion degree of generated code, and easy to read , often running successfully on the first try.

Considering it now has Coding Plan activity , with a monthly API package for just 9.9 yuan, the value for money is very high. If you need a programming model, it is recommended to subscribe.

(End)