[{"data":1,"prerenderedAt":1939},["ShallowReactive",2],{"content-query-wCrnwvK0kp":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"url":11,"tags":12,"en-title":17,"body":18,"_type":1933,"_id":1934,"_source":1935,"_file":1936,"_stem":1937,"_extension":1938},"/blog/claude-code-deepseek","blog",false,"","Claude Code 接入 DeepSeek API","Claude Code 是 Anthropic 官方的命令行 AI 编程助手，但它并不强制绑定 Anthropic 的 API。通过配置，你可以将其后端模型切换为 DeepSeek，享受更低的成本和同样强大的编码能力。","2026-05-16 12:36:43",null,[13,14,15,16],"claude","deepseek","AI","教程","Connect Claude Code to DeepSeek",{"type":19,"children":20,"toc":1915},"root",[21,30,35,62,66,73,78,85,106,112,131,281,286,375,381,386,525,545,551,556,559,565,577,582,665,671,725,730,765,768,774,786,1066,1078,1091,1094,1100,1113,1204,1217,1474,1477,1483,1488,1659,1662,1667,1758,1768,1771,1776,1890,1909],{"type":22,"tag":23,"props":24,"children":26},"element","h1",{"id":25},"claude-code-接入-deepseek-完全指南",[27],{"type":28,"value":29},"text","Claude Code 接入 DeepSeek 完全指南",{"type":22,"tag":31,"props":32,"children":33},"p",{},[34],{"type":28,"value":9},{"type":22,"tag":31,"props":36,"children":37},{},[38,40,46,48,53,55,60],{"type":28,"value":39},"本文将介绍三种主流接入方式：",{"type":22,"tag":41,"props":42,"children":43},"strong",{},[44],{"type":28,"value":45},"环境变量法",{"type":28,"value":47},"（最简单）、",{"type":22,"tag":41,"props":49,"children":50},{},[51],{"type":28,"value":52},"CC Switch GUI 工具",{"type":28,"value":54},"（可视化切换）、",{"type":22,"tag":41,"props":56,"children":57},{},[58],{"type":28,"value":59},"直接修改配置文件",{"type":28,"value":61},"（一劳永逸）。",{"type":22,"tag":63,"props":64,"children":65},"hr",{},[],{"type":22,"tag":67,"props":68,"children":70},"h2",{"id":69},"方法一环境变量法推荐新手",[71],{"type":28,"value":72},"方法一：环境变量法（推荐新手）",{"type":22,"tag":31,"props":74,"children":75},{},[76],{"type":28,"value":77},"这是 DeepSeek 官方文档中推荐的方式，无需安装任何额外工具。",{"type":22,"tag":79,"props":80,"children":82},"h3",{"id":81},"_1-获取-deepseek-api-key",[83],{"type":28,"value":84},"1. 获取 DeepSeek API Key",{"type":22,"tag":31,"props":86,"children":87},{},[88,90,104],{"type":28,"value":89},"前往 ",{"type":22,"tag":91,"props":92,"children":94},"span",{"style":93},"color:#00C2FF",[95],{"type":22,"tag":96,"props":97,"children":101},"a",{"href":98,"rel":99},"https://platform.deepseek.com/",[100],"nofollow",[102],{"type":28,"value":103},"DeepSeek 开发者平台",{"type":28,"value":105}," 注册并创建 API Key。",{"type":22,"tag":79,"props":107,"children":109},{"id":108},"_2-设置环境变量",[110],{"type":28,"value":111},"2. 设置环境变量",{"type":22,"tag":31,"props":113,"children":114},{},[115,117,129],{"type":28,"value":116},"根据 ",{"type":22,"tag":91,"props":118,"children":119},{"style":93},[120,127],{"type":22,"tag":96,"props":121,"children":124},{"href":122,"rel":123},"https://api-docs.deepseek.com/zh-cn/guides/agent_integrations/claude_code",[100],[125],{"type":28,"value":126},"DeepSeek 官方 API 文档",{"type":28,"value":128},"，",{"type":28,"value":130},"Claude Code 兼容接口地址为：",{"type":22,"tag":132,"props":133,"children":137},"pre",{"className":134,"code":135,"language":136,"meta":7,"style":7},"language-bash shiki shiki-themes vitesse-light vitesse-dark monokai","# 日常使用推荐 Flash 模型（速度快、成本低）\nexport ANTHROPIC_BASE_URL=\"https://api.deepseek.com/anthropic\"\nexport ANTHROPIC_API_KEY=\"sk-你的API-Key\"\nexport ANTHROPIC_MODEL=\"deepseek-v4-flash\"\n\n# 启动 Claude Code\nclaude\n","bash",[138],{"type":22,"tag":139,"props":140,"children":141},"code",{"__ignoreMap":7},[142,153,192,222,252,262,271],{"type":22,"tag":91,"props":143,"children":146},{"class":144,"line":145},"line",1,[147],{"type":22,"tag":91,"props":148,"children":150},{"style":149},"--shiki-default:#A0ADA0;--shiki-dark:#758575DD;--shiki-sepia:#88846F",[151],{"type":28,"value":152},"# 日常使用推荐 Flash 模型（速度快、成本低）\n",{"type":22,"tag":91,"props":154,"children":156},{"class":144,"line":155},2,[157,163,169,175,181,187],{"type":22,"tag":91,"props":158,"children":160},{"style":159},"--shiki-default:#AB5959;--shiki-dark:#CB7676;--shiki-sepia:#F92672",[161],{"type":28,"value":162},"export",{"type":22,"tag":91,"props":164,"children":166},{"style":165},"--shiki-default:#B07D48;--shiki-dark:#BD976A;--shiki-sepia:#F8F8F2",[167],{"type":28,"value":168}," ANTHROPIC_BASE_URL",{"type":22,"tag":91,"props":170,"children":172},{"style":171},"--shiki-default:#999999;--shiki-dark:#666666;--shiki-sepia:#F92672",[173],{"type":28,"value":174},"=",{"type":22,"tag":91,"props":176,"children":178},{"style":177},"--shiki-default:#B5695977;--shiki-dark:#C98A7D77;--shiki-sepia:#E6DB74",[179],{"type":28,"value":180},"\"",{"type":22,"tag":91,"props":182,"children":184},{"style":183},"--shiki-default:#B56959;--shiki-dark:#C98A7D;--shiki-sepia:#E6DB74",[185],{"type":28,"value":186},"https://api.deepseek.com/anthropic",{"type":22,"tag":91,"props":188,"children":189},{"style":177},[190],{"type":28,"value":191},"\"\n",{"type":22,"tag":91,"props":193,"children":195},{"class":144,"line":194},3,[196,200,205,209,213,218],{"type":22,"tag":91,"props":197,"children":198},{"style":159},[199],{"type":28,"value":162},{"type":22,"tag":91,"props":201,"children":202},{"style":165},[203],{"type":28,"value":204}," ANTHROPIC_API_KEY",{"type":22,"tag":91,"props":206,"children":207},{"style":171},[208],{"type":28,"value":174},{"type":22,"tag":91,"props":210,"children":211},{"style":177},[212],{"type":28,"value":180},{"type":22,"tag":91,"props":214,"children":215},{"style":183},[216],{"type":28,"value":217},"sk-你的API-Key",{"type":22,"tag":91,"props":219,"children":220},{"style":177},[221],{"type":28,"value":191},{"type":22,"tag":91,"props":223,"children":225},{"class":144,"line":224},4,[226,230,235,239,243,248],{"type":22,"tag":91,"props":227,"children":228},{"style":159},[229],{"type":28,"value":162},{"type":22,"tag":91,"props":231,"children":232},{"style":165},[233],{"type":28,"value":234}," ANTHROPIC_MODEL",{"type":22,"tag":91,"props":236,"children":237},{"style":171},[238],{"type":28,"value":174},{"type":22,"tag":91,"props":240,"children":241},{"style":177},[242],{"type":28,"value":180},{"type":22,"tag":91,"props":244,"children":245},{"style":183},[246],{"type":28,"value":247},"deepseek-v4-flash",{"type":22,"tag":91,"props":249,"children":250},{"style":177},[251],{"type":28,"value":191},{"type":22,"tag":91,"props":253,"children":255},{"class":144,"line":254},5,[256],{"type":22,"tag":91,"props":257,"children":259},{"emptyLinePlaceholder":258},true,[260],{"type":28,"value":261},"\n",{"type":22,"tag":91,"props":263,"children":265},{"class":144,"line":264},6,[266],{"type":22,"tag":91,"props":267,"children":268},{"style":149},[269],{"type":28,"value":270},"# 启动 Claude Code\n",{"type":22,"tag":91,"props":272,"children":274},{"class":144,"line":273},7,[275],{"type":22,"tag":91,"props":276,"children":278},{"style":277},"--shiki-default:#59873A;--shiki-dark:#80A665;--shiki-sepia:#A6E22E",[279],{"type":28,"value":280},"claude\n",{"type":22,"tag":31,"props":282,"children":283},{},[284],{"type":28,"value":285},"如果需要更强的推理能力，改用 Pro 模型：",{"type":22,"tag":132,"props":287,"children":289},{"className":134,"code":288,"language":136,"meta":7,"style":7},"export ANTHROPIC_BASE_URL=\"https://api.deepseek.com/anthropic\"\nexport ANTHROPIC_API_KEY=\"sk-你的API-Key\"\nexport ANTHROPIC_MODEL=\"deepseek-v4-pro\"\n",[290],{"type":22,"tag":139,"props":291,"children":292},{"__ignoreMap":7},[293,320,347],{"type":22,"tag":91,"props":294,"children":295},{"class":144,"line":145},[296,300,304,308,312,316],{"type":22,"tag":91,"props":297,"children":298},{"style":159},[299],{"type":28,"value":162},{"type":22,"tag":91,"props":301,"children":302},{"style":165},[303],{"type":28,"value":168},{"type":22,"tag":91,"props":305,"children":306},{"style":171},[307],{"type":28,"value":174},{"type":22,"tag":91,"props":309,"children":310},{"style":177},[311],{"type":28,"value":180},{"type":22,"tag":91,"props":313,"children":314},{"style":183},[315],{"type":28,"value":186},{"type":22,"tag":91,"props":317,"children":318},{"style":177},[319],{"type":28,"value":191},{"type":22,"tag":91,"props":321,"children":322},{"class":144,"line":155},[323,327,331,335,339,343],{"type":22,"tag":91,"props":324,"children":325},{"style":159},[326],{"type":28,"value":162},{"type":22,"tag":91,"props":328,"children":329},{"style":165},[330],{"type":28,"value":204},{"type":22,"tag":91,"props":332,"children":333},{"style":171},[334],{"type":28,"value":174},{"type":22,"tag":91,"props":336,"children":337},{"style":177},[338],{"type":28,"value":180},{"type":22,"tag":91,"props":340,"children":341},{"style":183},[342],{"type":28,"value":217},{"type":22,"tag":91,"props":344,"children":345},{"style":177},[346],{"type":28,"value":191},{"type":22,"tag":91,"props":348,"children":349},{"class":144,"line":194},[350,354,358,362,366,371],{"type":22,"tag":91,"props":351,"children":352},{"style":159},[353],{"type":28,"value":162},{"type":22,"tag":91,"props":355,"children":356},{"style":165},[357],{"type":28,"value":234},{"type":22,"tag":91,"props":359,"children":360},{"style":171},[361],{"type":28,"value":174},{"type":22,"tag":91,"props":363,"children":364},{"style":177},[365],{"type":28,"value":180},{"type":22,"tag":91,"props":367,"children":368},{"style":183},[369],{"type":28,"value":370},"deepseek-v4-pro",{"type":22,"tag":91,"props":372,"children":373},{"style":177},[374],{"type":28,"value":191},{"type":22,"tag":79,"props":376,"children":378},{"id":377},"_3-创建启动脚本推荐",[379],{"type":28,"value":380},"3. 创建启动脚本（推荐）",{"type":22,"tag":31,"props":382,"children":383},{},[384],{"type":28,"value":385},"每次都敲一遍环境变量太麻烦，建议做成脚本：",{"type":22,"tag":132,"props":387,"children":389},{"className":134,"code":388,"language":136,"meta":7,"style":7},"mkdir -p ~/.local/bin\n\ncat > ~/.local/bin/claude-deepseek \u003C\u003C 'EOF'\n#!/usr/bin/env bash\nexport ANTHROPIC_BASE_URL=\"https://api.deepseek.com/anthropic\"\nexport ANTHROPIC_API_KEY=\"sk-你的API-Key\"\nexport ANTHROPIC_MODEL=\"deepseek-v4-flash\"\nexec claude \"$@\"\nEOF\n\nchmod +x ~/.local/bin/claude-deepseek\n",[390],{"type":22,"tag":139,"props":391,"children":392},{"__ignoreMap":7},[393,412,419,448,456,464,472,480,489,498,506],{"type":22,"tag":91,"props":394,"children":395},{"class":144,"line":145},[396,401,407],{"type":22,"tag":91,"props":397,"children":398},{"style":277},[399],{"type":28,"value":400},"mkdir",{"type":22,"tag":91,"props":402,"children":404},{"style":403},"--shiki-default:#A65E2B;--shiki-dark:#C99076;--shiki-sepia:#AE81FF",[405],{"type":28,"value":406}," -p",{"type":22,"tag":91,"props":408,"children":409},{"style":183},[410],{"type":28,"value":411}," ~/.local/bin\n",{"type":22,"tag":91,"props":413,"children":414},{"class":144,"line":155},[415],{"type":22,"tag":91,"props":416,"children":417},{"emptyLinePlaceholder":258},[418],{"type":28,"value":261},{"type":22,"tag":91,"props":420,"children":421},{"class":144,"line":194},[422,427,432,437,442],{"type":22,"tag":91,"props":423,"children":424},{"style":277},[425],{"type":28,"value":426},"cat",{"type":22,"tag":91,"props":428,"children":429},{"style":159},[430],{"type":28,"value":431}," >",{"type":22,"tag":91,"props":433,"children":434},{"style":183},[435],{"type":28,"value":436}," ~/.local/bin/claude-deepseek",{"type":22,"tag":91,"props":438,"children":439},{"style":159},[440],{"type":28,"value":441}," \u003C\u003C",{"type":22,"tag":91,"props":443,"children":445},{"style":444},"--shiki-default:#B5695977;--shiki-dark:#C98A7D77;--shiki-sepia:#F8F8F2",[446],{"type":28,"value":447}," 'EOF'\n",{"type":22,"tag":91,"props":449,"children":450},{"class":144,"line":224},[451],{"type":22,"tag":91,"props":452,"children":453},{"style":183},[454],{"type":28,"value":455},"#!/usr/bin/env bash\n",{"type":22,"tag":91,"props":457,"children":458},{"class":144,"line":254},[459],{"type":22,"tag":91,"props":460,"children":461},{"style":183},[462],{"type":28,"value":463},"export ANTHROPIC_BASE_URL=\"https://api.deepseek.com/anthropic\"\n",{"type":22,"tag":91,"props":465,"children":466},{"class":144,"line":264},[467],{"type":22,"tag":91,"props":468,"children":469},{"style":183},[470],{"type":28,"value":471},"export ANTHROPIC_API_KEY=\"sk-你的API-Key\"\n",{"type":22,"tag":91,"props":473,"children":474},{"class":144,"line":273},[475],{"type":22,"tag":91,"props":476,"children":477},{"style":183},[478],{"type":28,"value":479},"export ANTHROPIC_MODEL=\"deepseek-v4-flash\"\n",{"type":22,"tag":91,"props":481,"children":483},{"class":144,"line":482},8,[484],{"type":22,"tag":91,"props":485,"children":486},{"style":183},[487],{"type":28,"value":488},"exec claude \"$@\"\n",{"type":22,"tag":91,"props":490,"children":492},{"class":144,"line":491},9,[493],{"type":22,"tag":91,"props":494,"children":495},{"style":444},[496],{"type":28,"value":497},"EOF\n",{"type":22,"tag":91,"props":499,"children":501},{"class":144,"line":500},10,[502],{"type":22,"tag":91,"props":503,"children":504},{"emptyLinePlaceholder":258},[505],{"type":28,"value":261},{"type":22,"tag":91,"props":507,"children":509},{"class":144,"line":508},11,[510,515,520],{"type":22,"tag":91,"props":511,"children":512},{"style":277},[513],{"type":28,"value":514},"chmod",{"type":22,"tag":91,"props":516,"children":517},{"style":183},[518],{"type":28,"value":519}," +x",{"type":22,"tag":91,"props":521,"children":522},{"style":183},[523],{"type":28,"value":524}," ~/.local/bin/claude-deepseek\n",{"type":22,"tag":31,"props":526,"children":527},{},[528,530,536,538,543],{"type":28,"value":529},"之后直接运行 ",{"type":22,"tag":139,"props":531,"children":533},{"className":532},[],[534],{"type":28,"value":535},"claude-deepseek",{"type":28,"value":537}," 即可，不影响原生 ",{"type":22,"tag":139,"props":539,"children":541},{"className":540},[],[542],{"type":28,"value":13},{"type":28,"value":544}," 命令的使用。",{"type":22,"tag":79,"props":546,"children":548},{"id":547},"_4-验证是否生效",[549],{"type":28,"value":550},"4. 验证是否生效",{"type":22,"tag":31,"props":552,"children":553},{},[554],{"type":28,"value":555},"启动 Claude Code 后，输入任意问题，观察响应速度和模型名称。如果返回正常，说明接入成功。",{"type":22,"tag":63,"props":557,"children":558},{},[],{"type":22,"tag":67,"props":560,"children":562},{"id":561},"方法二cc-switchgui-可视化切换",[563],{"type":28,"value":564},"方法二：CC Switch（GUI 可视化切换）",{"type":22,"tag":31,"props":566,"children":567},{},[568,575],{"type":22,"tag":96,"props":569,"children":572},{"href":570,"rel":571},"https://github.com/farion1231/cc-switch",[100],[573],{"type":28,"value":574},"CC Switch",{"type":28,"value":576}," 是一个开源的桌面应用，提供图形界面来管理 Claude Code 的多供应商配置，支持一键切换。",{"type":22,"tag":79,"props":578,"children":580},{"id":579},"安装",[581],{"type":28,"value":579},{"type":22,"tag":583,"props":584,"children":585},"table",{},[586,605],{"type":22,"tag":587,"props":588,"children":589},"thead",{},[590],{"type":22,"tag":591,"props":592,"children":593},"tr",{},[594,600],{"type":22,"tag":595,"props":596,"children":597},"th",{},[598],{"type":28,"value":599},"平台",{"type":22,"tag":595,"props":601,"children":602},{},[603],{"type":28,"value":604},"下载方式",{"type":22,"tag":606,"props":607,"children":608},"tbody",{},[609,629,646],{"type":22,"tag":591,"props":610,"children":611},{},[612,618],{"type":22,"tag":613,"props":614,"children":615},"td",{},[616],{"type":28,"value":617},"Windows",{"type":22,"tag":613,"props":619,"children":620},{},[621,627],{"type":22,"tag":139,"props":622,"children":624},{"className":623},[],[625],{"type":28,"value":626},"CC-Switch-Setup-x.x.x.exe",{"type":28,"value":628}," 或绿色版",{"type":22,"tag":591,"props":630,"children":631},{},[632,637],{"type":22,"tag":613,"props":633,"children":634},{},[635],{"type":28,"value":636},"macOS",{"type":22,"tag":613,"props":638,"children":639},{},[640],{"type":22,"tag":139,"props":641,"children":643},{"className":642},[],[644],{"type":28,"value":645},"CC Switch-x.x.x-mac.zip",{"type":22,"tag":591,"props":647,"children":648},{},[649,654],{"type":22,"tag":613,"props":650,"children":651},{},[652],{"type":28,"value":653},"Linux",{"type":22,"tag":613,"props":655,"children":656},{},[657,663],{"type":22,"tag":139,"props":658,"children":660},{"className":659},[],[661],{"type":28,"value":662},".AppImage",{"type":28,"value":664}," 文件",{"type":22,"tag":79,"props":666,"children":668},{"id":667},"配置-deepseek",[669],{"type":28,"value":670},"配置 DeepSeek",{"type":22,"tag":672,"props":673,"children":674},"ol",{},[675,681,686,696,701,720],{"type":22,"tag":676,"props":677,"children":678},"li",{},[679],{"type":28,"value":680},"打开 CC Switch",{"type":22,"tag":676,"props":682,"children":683},{},[684],{"type":28,"value":685},"点击右上角 「+」按钮添加新配置",{"type":22,"tag":676,"props":687,"children":688},{},[689,691],{"type":28,"value":690},"选择预设 ",{"type":22,"tag":41,"props":692,"children":693},{},[694],{"type":28,"value":695},"DeepSeek",{"type":22,"tag":676,"props":697,"children":698},{},[699],{"type":28,"value":700},"填写你的 API Key",{"type":22,"tag":676,"props":702,"children":703},{},[704,706,711,713,718],{"type":28,"value":705},"设置模型名称（全部改为 ",{"type":22,"tag":139,"props":707,"children":709},{"className":708},[],[710],{"type":28,"value":370},{"type":28,"value":712}," 或 ",{"type":22,"tag":139,"props":714,"children":716},{"className":715},[],[717],{"type":28,"value":247},{"type":28,"value":719},"）",{"type":22,"tag":676,"props":721,"children":722},{},[723],{"type":28,"value":724},"点击「添加」→ 再点击「启用」",{"type":22,"tag":79,"props":726,"children":728},{"id":727},"注意事项",[729],{"type":28,"value":727},{"type":22,"tag":31,"props":731,"children":732},{},[733,735,741,743,748,750,755,757,763],{"type":28,"value":734},"CC Switch 底层本质上是修改 ",{"type":22,"tag":139,"props":736,"children":738},{"className":737},[],[739],{"type":28,"value":740},"~/.claude/settings.json",{"type":28,"value":742}," 配置文件。如果你在 CC Switch 中开启了",{"type":22,"tag":41,"props":744,"children":745},{},[746],{"type":28,"value":747},"本地路由/代理模式",{"type":28,"value":749},"，模型名后",{"type":22,"tag":41,"props":751,"children":752},{},[753],{"type":28,"value":754},"不要",{"type":28,"value":756},"加 ",{"type":22,"tag":139,"props":758,"children":760},{"className":759},[],[761],{"type":28,"value":762},"[1m]",{"type":28,"value":764}," 后缀（用于开启 1M 上下文），否则会导致 fallback 到 flash 模型。",{"type":22,"tag":63,"props":766,"children":767},{},[],{"type":22,"tag":67,"props":769,"children":771},{"id":770},"方法三直接修改配置文件最彻底",[772],{"type":28,"value":773},"方法三：直接修改配置文件（最彻底）",{"type":22,"tag":31,"props":775,"children":776},{},[777,779,784],{"type":28,"value":778},"Claude Code 的配置文件位于 ",{"type":22,"tag":139,"props":780,"children":782},{"className":781},[],[783],{"type":28,"value":740},{"type":28,"value":785},"，直接编辑它即可永久生效。",{"type":22,"tag":132,"props":787,"children":791},{"className":788,"code":789,"language":790,"meta":7,"style":7},"language-json shiki shiki-themes vitesse-light vitesse-dark monokai","{\n  \"env\": {\n    \"ANTHROPIC_BASE_URL\": \"https://api.deepseek.com/anthropic\",\n    \"ANTHROPIC_API_KEY\": \"sk-你的API-Key\",\n    \"ANTHROPIC_MODEL\": \"deepseek-v4-pro\",\n    \"ANTHROPIC_DEFAULT_HAIKU_MODEL\": \"deepseek-v4-flash\",\n    \"ANTHROPIC_DEFAULT_SONNET_MODEL\": \"deepseek-v4-pro\",\n    \"ANTHROPIC_DEFAULT_OPUS_MODEL\": \"deepseek-v4-pro\"\n  }\n}\n","json",[792],{"type":22,"tag":139,"props":793,"children":794},{"__ignoreMap":7},[795,804,833,874,910,946,982,1018,1050,1058],{"type":22,"tag":91,"props":796,"children":797},{"class":144,"line":145},[798],{"type":22,"tag":91,"props":799,"children":801},{"style":800},"--shiki-default:#999999;--shiki-dark:#666666;--shiki-sepia:#F8F8F2",[802],{"type":28,"value":803},"{\n",{"type":22,"tag":91,"props":805,"children":806},{"class":144,"line":155},[807,813,819,823,828],{"type":22,"tag":91,"props":808,"children":810},{"style":809},"--shiki-default:#99841877;--shiki-default-font-style:inherit;--shiki-dark:#B8A96577;--shiki-dark-font-style:inherit;--shiki-sepia:#66D9EF;--shiki-sepia-font-style:italic",[811],{"type":28,"value":812},"  \"",{"type":22,"tag":91,"props":814,"children":816},{"style":815},"--shiki-default:#998418;--shiki-default-font-style:inherit;--shiki-dark:#B8A965;--shiki-dark-font-style:inherit;--shiki-sepia:#66D9EF;--shiki-sepia-font-style:italic",[817],{"type":28,"value":818},"env",{"type":22,"tag":91,"props":820,"children":821},{"style":809},[822],{"type":28,"value":180},{"type":22,"tag":91,"props":824,"children":825},{"style":800},[826],{"type":28,"value":827},":",{"type":22,"tag":91,"props":829,"children":830},{"style":800},[831],{"type":28,"value":832}," {\n",{"type":22,"tag":91,"props":834,"children":835},{"class":144,"line":194},[836,841,846,850,854,860,865,869],{"type":22,"tag":91,"props":837,"children":838},{"style":809},[839],{"type":28,"value":840},"    \"",{"type":22,"tag":91,"props":842,"children":843},{"style":815},[844],{"type":28,"value":845},"ANTHROPIC_BASE_URL",{"type":22,"tag":91,"props":847,"children":848},{"style":809},[849],{"type":28,"value":180},{"type":22,"tag":91,"props":851,"children":852},{"style":800},[853],{"type":28,"value":827},{"type":22,"tag":91,"props":855,"children":857},{"style":856},"--shiki-default:#B5695977;--shiki-dark:#C98A7D77;--shiki-sepia:#CFCFC2",[858],{"type":28,"value":859}," \"",{"type":22,"tag":91,"props":861,"children":863},{"style":862},"--shiki-default:#B56959;--shiki-dark:#C98A7D;--shiki-sepia:#CFCFC2",[864],{"type":28,"value":186},{"type":22,"tag":91,"props":866,"children":867},{"style":856},[868],{"type":28,"value":180},{"type":22,"tag":91,"props":870,"children":871},{"style":800},[872],{"type":28,"value":873},",\n",{"type":22,"tag":91,"props":875,"children":876},{"class":144,"line":224},[877,881,886,890,894,898,902,906],{"type":22,"tag":91,"props":878,"children":879},{"style":809},[880],{"type":28,"value":840},{"type":22,"tag":91,"props":882,"children":883},{"style":815},[884],{"type":28,"value":885},"ANTHROPIC_API_KEY",{"type":22,"tag":91,"props":887,"children":888},{"style":809},[889],{"type":28,"value":180},{"type":22,"tag":91,"props":891,"children":892},{"style":800},[893],{"type":28,"value":827},{"type":22,"tag":91,"props":895,"children":896},{"style":856},[897],{"type":28,"value":859},{"type":22,"tag":91,"props":899,"children":900},{"style":862},[901],{"type":28,"value":217},{"type":22,"tag":91,"props":903,"children":904},{"style":856},[905],{"type":28,"value":180},{"type":22,"tag":91,"props":907,"children":908},{"style":800},[909],{"type":28,"value":873},{"type":22,"tag":91,"props":911,"children":912},{"class":144,"line":254},[913,917,922,926,930,934,938,942],{"type":22,"tag":91,"props":914,"children":915},{"style":809},[916],{"type":28,"value":840},{"type":22,"tag":91,"props":918,"children":919},{"style":815},[920],{"type":28,"value":921},"ANTHROPIC_MODEL",{"type":22,"tag":91,"props":923,"children":924},{"style":809},[925],{"type":28,"value":180},{"type":22,"tag":91,"props":927,"children":928},{"style":800},[929],{"type":28,"value":827},{"type":22,"tag":91,"props":931,"children":932},{"style":856},[933],{"type":28,"value":859},{"type":22,"tag":91,"props":935,"children":936},{"style":862},[937],{"type":28,"value":370},{"type":22,"tag":91,"props":939,"children":940},{"style":856},[941],{"type":28,"value":180},{"type":22,"tag":91,"props":943,"children":944},{"style":800},[945],{"type":28,"value":873},{"type":22,"tag":91,"props":947,"children":948},{"class":144,"line":264},[949,953,958,962,966,970,974,978],{"type":22,"tag":91,"props":950,"children":951},{"style":809},[952],{"type":28,"value":840},{"type":22,"tag":91,"props":954,"children":955},{"style":815},[956],{"type":28,"value":957},"ANTHROPIC_DEFAULT_HAIKU_MODEL",{"type":22,"tag":91,"props":959,"children":960},{"style":809},[961],{"type":28,"value":180},{"type":22,"tag":91,"props":963,"children":964},{"style":800},[965],{"type":28,"value":827},{"type":22,"tag":91,"props":967,"children":968},{"style":856},[969],{"type":28,"value":859},{"type":22,"tag":91,"props":971,"children":972},{"style":862},[973],{"type":28,"value":247},{"type":22,"tag":91,"props":975,"children":976},{"style":856},[977],{"type":28,"value":180},{"type":22,"tag":91,"props":979,"children":980},{"style":800},[981],{"type":28,"value":873},{"type":22,"tag":91,"props":983,"children":984},{"class":144,"line":273},[985,989,994,998,1002,1006,1010,1014],{"type":22,"tag":91,"props":986,"children":987},{"style":809},[988],{"type":28,"value":840},{"type":22,"tag":91,"props":990,"children":991},{"style":815},[992],{"type":28,"value":993},"ANTHROPIC_DEFAULT_SONNET_MODEL",{"type":22,"tag":91,"props":995,"children":996},{"style":809},[997],{"type":28,"value":180},{"type":22,"tag":91,"props":999,"children":1000},{"style":800},[1001],{"type":28,"value":827},{"type":22,"tag":91,"props":1003,"children":1004},{"style":856},[1005],{"type":28,"value":859},{"type":22,"tag":91,"props":1007,"children":1008},{"style":862},[1009],{"type":28,"value":370},{"type":22,"tag":91,"props":1011,"children":1012},{"style":856},[1013],{"type":28,"value":180},{"type":22,"tag":91,"props":1015,"children":1016},{"style":800},[1017],{"type":28,"value":873},{"type":22,"tag":91,"props":1019,"children":1020},{"class":144,"line":482},[1021,1025,1030,1034,1038,1042,1046],{"type":22,"tag":91,"props":1022,"children":1023},{"style":809},[1024],{"type":28,"value":840},{"type":22,"tag":91,"props":1026,"children":1027},{"style":815},[1028],{"type":28,"value":1029},"ANTHROPIC_DEFAULT_OPUS_MODEL",{"type":22,"tag":91,"props":1031,"children":1032},{"style":809},[1033],{"type":28,"value":180},{"type":22,"tag":91,"props":1035,"children":1036},{"style":800},[1037],{"type":28,"value":827},{"type":22,"tag":91,"props":1039,"children":1040},{"style":856},[1041],{"type":28,"value":859},{"type":22,"tag":91,"props":1043,"children":1044},{"style":862},[1045],{"type":28,"value":370},{"type":22,"tag":91,"props":1047,"children":1048},{"style":856},[1049],{"type":28,"value":191},{"type":22,"tag":91,"props":1051,"children":1052},{"class":144,"line":491},[1053],{"type":22,"tag":91,"props":1054,"children":1055},{"style":800},[1056],{"type":28,"value":1057},"  }\n",{"type":22,"tag":91,"props":1059,"children":1060},{"class":144,"line":500},[1061],{"type":22,"tag":91,"props":1062,"children":1063},{"style":800},[1064],{"type":28,"value":1065},"}\n",{"type":22,"tag":31,"props":1067,"children":1068},{},[1069,1071,1076],{"type":28,"value":1070},"修改保存后，重启 Claude Code 即可生效。此方法的好处是",{"type":22,"tag":41,"props":1072,"children":1073},{},[1074],{"type":28,"value":1075},"一次配置，永久生效",{"type":28,"value":1077},"，无需每次手动设置环境变量。",{"type":22,"tag":31,"props":1079,"children":1080},{},[1081,1083,1089],{"type":28,"value":1082},"如果你的项目需要单独配置，也可以在项目根目录创建 ",{"type":22,"tag":139,"props":1084,"children":1086},{"className":1085},[],[1087],{"type":28,"value":1088},".claude/settings.json",{"type":28,"value":1090},"，只对该项目生效。",{"type":22,"tag":63,"props":1092,"children":1093},{},[],{"type":22,"tag":67,"props":1095,"children":1097},{"id":1096},"方法四cc-model-switchercli-工具",[1098],{"type":28,"value":1099},"方法四：cc-model-switcher（CLI 工具）",{"type":22,"tag":31,"props":1101,"children":1102},{},[1103,1105,1111],{"type":28,"value":1104},"如果你喜欢命令行操作，可以使用 ",{"type":22,"tag":139,"props":1106,"children":1108},{"className":1107},[],[1109],{"type":28,"value":1110},"cc-model-switcher",{"type":28,"value":1112}," 这个 npm 包：",{"type":22,"tag":132,"props":1114,"children":1116},{"className":134,"code":1115,"language":136,"meta":7,"style":7},"npm install -g cc-model-switcher\n# 切换到 DeepSeek\ncc_switch deepseek\n# 交互式选择\ncc_switch --interactive\n# 查看所有可用模型\ncc_switch -l\n",[1117],{"type":22,"tag":139,"props":1118,"children":1119},{"__ignoreMap":7},[1120,1143,1151,1164,1172,1184,1192],{"type":22,"tag":91,"props":1121,"children":1122},{"class":144,"line":145},[1123,1128,1133,1138],{"type":22,"tag":91,"props":1124,"children":1125},{"style":277},[1126],{"type":28,"value":1127},"npm",{"type":22,"tag":91,"props":1129,"children":1130},{"style":183},[1131],{"type":28,"value":1132}," install",{"type":22,"tag":91,"props":1134,"children":1135},{"style":403},[1136],{"type":28,"value":1137}," -g",{"type":22,"tag":91,"props":1139,"children":1140},{"style":183},[1141],{"type":28,"value":1142}," cc-model-switcher\n",{"type":22,"tag":91,"props":1144,"children":1145},{"class":144,"line":155},[1146],{"type":22,"tag":91,"props":1147,"children":1148},{"style":149},[1149],{"type":28,"value":1150},"# 切换到 DeepSeek\n",{"type":22,"tag":91,"props":1152,"children":1153},{"class":144,"line":194},[1154,1159],{"type":22,"tag":91,"props":1155,"children":1156},{"style":277},[1157],{"type":28,"value":1158},"cc_switch",{"type":22,"tag":91,"props":1160,"children":1161},{"style":183},[1162],{"type":28,"value":1163}," deepseek\n",{"type":22,"tag":91,"props":1165,"children":1166},{"class":144,"line":224},[1167],{"type":22,"tag":91,"props":1168,"children":1169},{"style":149},[1170],{"type":28,"value":1171},"# 交互式选择\n",{"type":22,"tag":91,"props":1173,"children":1174},{"class":144,"line":254},[1175,1179],{"type":22,"tag":91,"props":1176,"children":1177},{"style":277},[1178],{"type":28,"value":1158},{"type":22,"tag":91,"props":1180,"children":1181},{"style":403},[1182],{"type":28,"value":1183}," --interactive\n",{"type":22,"tag":91,"props":1185,"children":1186},{"class":144,"line":264},[1187],{"type":22,"tag":91,"props":1188,"children":1189},{"style":149},[1190],{"type":28,"value":1191},"# 查看所有可用模型\n",{"type":22,"tag":91,"props":1193,"children":1194},{"class":144,"line":273},[1195,1199],{"type":22,"tag":91,"props":1196,"children":1197},{"style":277},[1198],{"type":28,"value":1158},{"type":22,"tag":91,"props":1200,"children":1201},{"style":403},[1202],{"type":28,"value":1203}," -l\n",{"type":22,"tag":31,"props":1205,"children":1206},{},[1207,1209,1215],{"type":28,"value":1208},"配置文件位于 ",{"type":22,"tag":139,"props":1210,"children":1212},{"className":1211},[],[1213],{"type":28,"value":1214},"~/.models.json",{"type":28,"value":1216},"，可自定义：",{"type":22,"tag":132,"props":1218,"children":1220},{"className":788,"code":1219,"language":790,"meta":7,"style":7},"{\n  \"models\": {\n    \"deepseek\": {\n      \"description\": \"DeepSeek V4\",\n      \"env\": {\n        \"ANTHROPIC_BASE_URL\": \"https://api.deepseek.com/anthropic\",\n        \"ANTHROPIC_AUTH_TOKEN\": \"your-api-key\",\n        \"ANTHROPIC_MODEL\": \"deepseek-v4-pro\"\n      }\n    }\n  }\n}\n",[1221],{"type":22,"tag":139,"props":1222,"children":1223},{"__ignoreMap":7},[1224,1231,1255,1278,1316,1339,1375,1412,1443,1451,1459,1466],{"type":22,"tag":91,"props":1225,"children":1226},{"class":144,"line":145},[1227],{"type":22,"tag":91,"props":1228,"children":1229},{"style":800},[1230],{"type":28,"value":803},{"type":22,"tag":91,"props":1232,"children":1233},{"class":144,"line":155},[1234,1238,1243,1247,1251],{"type":22,"tag":91,"props":1235,"children":1236},{"style":809},[1237],{"type":28,"value":812},{"type":22,"tag":91,"props":1239,"children":1240},{"style":815},[1241],{"type":28,"value":1242},"models",{"type":22,"tag":91,"props":1244,"children":1245},{"style":809},[1246],{"type":28,"value":180},{"type":22,"tag":91,"props":1248,"children":1249},{"style":800},[1250],{"type":28,"value":827},{"type":22,"tag":91,"props":1252,"children":1253},{"style":800},[1254],{"type":28,"value":832},{"type":22,"tag":91,"props":1256,"children":1257},{"class":144,"line":194},[1258,1262,1266,1270,1274],{"type":22,"tag":91,"props":1259,"children":1260},{"style":809},[1261],{"type":28,"value":840},{"type":22,"tag":91,"props":1263,"children":1264},{"style":815},[1265],{"type":28,"value":14},{"type":22,"tag":91,"props":1267,"children":1268},{"style":809},[1269],{"type":28,"value":180},{"type":22,"tag":91,"props":1271,"children":1272},{"style":800},[1273],{"type":28,"value":827},{"type":22,"tag":91,"props":1275,"children":1276},{"style":800},[1277],{"type":28,"value":832},{"type":22,"tag":91,"props":1279,"children":1280},{"class":144,"line":224},[1281,1286,1291,1295,1299,1303,1308,1312],{"type":22,"tag":91,"props":1282,"children":1283},{"style":809},[1284],{"type":28,"value":1285},"      \"",{"type":22,"tag":91,"props":1287,"children":1288},{"style":815},[1289],{"type":28,"value":1290},"description",{"type":22,"tag":91,"props":1292,"children":1293},{"style":809},[1294],{"type":28,"value":180},{"type":22,"tag":91,"props":1296,"children":1297},{"style":800},[1298],{"type":28,"value":827},{"type":22,"tag":91,"props":1300,"children":1301},{"style":856},[1302],{"type":28,"value":859},{"type":22,"tag":91,"props":1304,"children":1305},{"style":862},[1306],{"type":28,"value":1307},"DeepSeek V4",{"type":22,"tag":91,"props":1309,"children":1310},{"style":856},[1311],{"type":28,"value":180},{"type":22,"tag":91,"props":1313,"children":1314},{"style":800},[1315],{"type":28,"value":873},{"type":22,"tag":91,"props":1317,"children":1318},{"class":144,"line":254},[1319,1323,1327,1331,1335],{"type":22,"tag":91,"props":1320,"children":1321},{"style":809},[1322],{"type":28,"value":1285},{"type":22,"tag":91,"props":1324,"children":1325},{"style":815},[1326],{"type":28,"value":818},{"type":22,"tag":91,"props":1328,"children":1329},{"style":809},[1330],{"type":28,"value":180},{"type":22,"tag":91,"props":1332,"children":1333},{"style":800},[1334],{"type":28,"value":827},{"type":22,"tag":91,"props":1336,"children":1337},{"style":800},[1338],{"type":28,"value":832},{"type":22,"tag":91,"props":1340,"children":1341},{"class":144,"line":264},[1342,1347,1351,1355,1359,1363,1367,1371],{"type":22,"tag":91,"props":1343,"children":1344},{"style":809},[1345],{"type":28,"value":1346},"        \"",{"type":22,"tag":91,"props":1348,"children":1349},{"style":815},[1350],{"type":28,"value":845},{"type":22,"tag":91,"props":1352,"children":1353},{"style":809},[1354],{"type":28,"value":180},{"type":22,"tag":91,"props":1356,"children":1357},{"style":800},[1358],{"type":28,"value":827},{"type":22,"tag":91,"props":1360,"children":1361},{"style":856},[1362],{"type":28,"value":859},{"type":22,"tag":91,"props":1364,"children":1365},{"style":862},[1366],{"type":28,"value":186},{"type":22,"tag":91,"props":1368,"children":1369},{"style":856},[1370],{"type":28,"value":180},{"type":22,"tag":91,"props":1372,"children":1373},{"style":800},[1374],{"type":28,"value":873},{"type":22,"tag":91,"props":1376,"children":1377},{"class":144,"line":273},[1378,1382,1387,1391,1395,1399,1404,1408],{"type":22,"tag":91,"props":1379,"children":1380},{"style":809},[1381],{"type":28,"value":1346},{"type":22,"tag":91,"props":1383,"children":1384},{"style":815},[1385],{"type":28,"value":1386},"ANTHROPIC_AUTH_TOKEN",{"type":22,"tag":91,"props":1388,"children":1389},{"style":809},[1390],{"type":28,"value":180},{"type":22,"tag":91,"props":1392,"children":1393},{"style":800},[1394],{"type":28,"value":827},{"type":22,"tag":91,"props":1396,"children":1397},{"style":856},[1398],{"type":28,"value":859},{"type":22,"tag":91,"props":1400,"children":1401},{"style":862},[1402],{"type":28,"value":1403},"your-api-key",{"type":22,"tag":91,"props":1405,"children":1406},{"style":856},[1407],{"type":28,"value":180},{"type":22,"tag":91,"props":1409,"children":1410},{"style":800},[1411],{"type":28,"value":873},{"type":22,"tag":91,"props":1413,"children":1414},{"class":144,"line":482},[1415,1419,1423,1427,1431,1435,1439],{"type":22,"tag":91,"props":1416,"children":1417},{"style":809},[1418],{"type":28,"value":1346},{"type":22,"tag":91,"props":1420,"children":1421},{"style":815},[1422],{"type":28,"value":921},{"type":22,"tag":91,"props":1424,"children":1425},{"style":809},[1426],{"type":28,"value":180},{"type":22,"tag":91,"props":1428,"children":1429},{"style":800},[1430],{"type":28,"value":827},{"type":22,"tag":91,"props":1432,"children":1433},{"style":856},[1434],{"type":28,"value":859},{"type":22,"tag":91,"props":1436,"children":1437},{"style":862},[1438],{"type":28,"value":370},{"type":22,"tag":91,"props":1440,"children":1441},{"style":856},[1442],{"type":28,"value":191},{"type":22,"tag":91,"props":1444,"children":1445},{"class":144,"line":491},[1446],{"type":22,"tag":91,"props":1447,"children":1448},{"style":800},[1449],{"type":28,"value":1450},"      }\n",{"type":22,"tag":91,"props":1452,"children":1453},{"class":144,"line":500},[1454],{"type":22,"tag":91,"props":1455,"children":1456},{"style":800},[1457],{"type":28,"value":1458},"    }\n",{"type":22,"tag":91,"props":1460,"children":1461},{"class":144,"line":508},[1462],{"type":22,"tag":91,"props":1463,"children":1464},{"style":800},[1465],{"type":28,"value":1057},{"type":22,"tag":91,"props":1467,"children":1469},{"class":144,"line":1468},12,[1470],{"type":22,"tag":91,"props":1471,"children":1472},{"style":800},[1473],{"type":28,"value":1065},{"type":22,"tag":63,"props":1475,"children":1476},{},[],{"type":22,"tag":67,"props":1478,"children":1480},{"id":1479},"方法五ccenv-cli-ccx环境变量管理器",[1481],{"type":28,"value":1482},"方法五：ccenv-cli / ccx（环境变量管理器）",{"type":22,"tag":31,"props":1484,"children":1485},{},[1486],{"type":28,"value":1487},"另一个轻量级选择，同样是 npm 包：",{"type":22,"tag":132,"props":1489,"children":1491},{"className":134,"code":1490,"language":136,"meta":7,"style":7},"npm install -g ccenv-cli\n\n# 创建 DeepSeek 配置\nccx create budget --template deepseek --api-key sk-xxxxx\n\n# 直接启动\nccx run budget\n\n# 在当前 shell 激活\neval \"$(ccx use budget)\"\nclaude\n",[1492],{"type":22,"tag":139,"props":1493,"children":1494},{"__ignoreMap":7},[1495,1515,1522,1530,1568,1575,1583,1600,1607,1615,1652],{"type":22,"tag":91,"props":1496,"children":1497},{"class":144,"line":145},[1498,1502,1506,1510],{"type":22,"tag":91,"props":1499,"children":1500},{"style":277},[1501],{"type":28,"value":1127},{"type":22,"tag":91,"props":1503,"children":1504},{"style":183},[1505],{"type":28,"value":1132},{"type":22,"tag":91,"props":1507,"children":1508},{"style":403},[1509],{"type":28,"value":1137},{"type":22,"tag":91,"props":1511,"children":1512},{"style":183},[1513],{"type":28,"value":1514}," ccenv-cli\n",{"type":22,"tag":91,"props":1516,"children":1517},{"class":144,"line":155},[1518],{"type":22,"tag":91,"props":1519,"children":1520},{"emptyLinePlaceholder":258},[1521],{"type":28,"value":261},{"type":22,"tag":91,"props":1523,"children":1524},{"class":144,"line":194},[1525],{"type":22,"tag":91,"props":1526,"children":1527},{"style":149},[1528],{"type":28,"value":1529},"# 创建 DeepSeek 配置\n",{"type":22,"tag":91,"props":1531,"children":1532},{"class":144,"line":224},[1533,1538,1543,1548,1553,1558,1563],{"type":22,"tag":91,"props":1534,"children":1535},{"style":277},[1536],{"type":28,"value":1537},"ccx",{"type":22,"tag":91,"props":1539,"children":1540},{"style":183},[1541],{"type":28,"value":1542}," create",{"type":22,"tag":91,"props":1544,"children":1545},{"style":183},[1546],{"type":28,"value":1547}," budget",{"type":22,"tag":91,"props":1549,"children":1550},{"style":403},[1551],{"type":28,"value":1552}," --template",{"type":22,"tag":91,"props":1554,"children":1555},{"style":183},[1556],{"type":28,"value":1557}," deepseek",{"type":22,"tag":91,"props":1559,"children":1560},{"style":403},[1561],{"type":28,"value":1562}," --api-key",{"type":22,"tag":91,"props":1564,"children":1565},{"style":183},[1566],{"type":28,"value":1567}," sk-xxxxx\n",{"type":22,"tag":91,"props":1569,"children":1570},{"class":144,"line":254},[1571],{"type":22,"tag":91,"props":1572,"children":1573},{"emptyLinePlaceholder":258},[1574],{"type":28,"value":261},{"type":22,"tag":91,"props":1576,"children":1577},{"class":144,"line":264},[1578],{"type":22,"tag":91,"props":1579,"children":1580},{"style":149},[1581],{"type":28,"value":1582},"# 直接启动\n",{"type":22,"tag":91,"props":1584,"children":1585},{"class":144,"line":273},[1586,1590,1595],{"type":22,"tag":91,"props":1587,"children":1588},{"style":277},[1589],{"type":28,"value":1537},{"type":22,"tag":91,"props":1591,"children":1592},{"style":183},[1593],{"type":28,"value":1594}," run",{"type":22,"tag":91,"props":1596,"children":1597},{"style":183},[1598],{"type":28,"value":1599}," budget\n",{"type":22,"tag":91,"props":1601,"children":1602},{"class":144,"line":482},[1603],{"type":22,"tag":91,"props":1604,"children":1605},{"emptyLinePlaceholder":258},[1606],{"type":28,"value":261},{"type":22,"tag":91,"props":1608,"children":1609},{"class":144,"line":491},[1610],{"type":22,"tag":91,"props":1611,"children":1612},{"style":149},[1613],{"type":28,"value":1614},"# 在当前 shell 激活\n",{"type":22,"tag":91,"props":1616,"children":1617},{"class":144,"line":500},[1618,1624,1628,1634,1638,1643,1648],{"type":22,"tag":91,"props":1619,"children":1621},{"style":1620},"--shiki-default:#998418;--shiki-dark:#B8A965;--shiki-sepia:#66D9EF",[1622],{"type":28,"value":1623},"eval",{"type":22,"tag":91,"props":1625,"children":1626},{"style":177},[1627],{"type":28,"value":859},{"type":22,"tag":91,"props":1629,"children":1631},{"style":1630},"--shiki-default:#999999;--shiki-dark:#666666;--shiki-sepia:#E6DB74",[1632],{"type":28,"value":1633},"$(",{"type":22,"tag":91,"props":1635,"children":1636},{"style":277},[1637],{"type":28,"value":1537},{"type":22,"tag":91,"props":1639,"children":1640},{"style":183},[1641],{"type":28,"value":1642}," use budget",{"type":22,"tag":91,"props":1644,"children":1645},{"style":1630},[1646],{"type":28,"value":1647},")",{"type":22,"tag":91,"props":1649,"children":1650},{"style":177},[1651],{"type":28,"value":191},{"type":22,"tag":91,"props":1653,"children":1654},{"class":144,"line":508},[1655],{"type":22,"tag":91,"props":1656,"children":1657},{"style":277},[1658],{"type":28,"value":280},{"type":22,"tag":63,"props":1660,"children":1661},{},[],{"type":22,"tag":67,"props":1663,"children":1665},{"id":1664},"模型选择建议",[1666],{"type":28,"value":1664},{"type":22,"tag":583,"props":1668,"children":1669},{},[1670,1691],{"type":22,"tag":587,"props":1671,"children":1672},{},[1673],{"type":22,"tag":591,"props":1674,"children":1675},{},[1676,1681,1686],{"type":22,"tag":595,"props":1677,"children":1678},{},[1679],{"type":28,"value":1680},"场景",{"type":22,"tag":595,"props":1682,"children":1683},{},[1684],{"type":28,"value":1685},"推荐模型",{"type":22,"tag":595,"props":1687,"children":1688},{},[1689],{"type":28,"value":1690},"原因",{"type":22,"tag":606,"props":1692,"children":1693},{},[1694,1715,1736],{"type":22,"tag":591,"props":1695,"children":1696},{},[1697,1702,1710],{"type":22,"tag":613,"props":1698,"children":1699},{},[1700],{"type":28,"value":1701},"日常编码、脚本、Bug 修复",{"type":22,"tag":613,"props":1703,"children":1704},{},[1705],{"type":22,"tag":139,"props":1706,"children":1708},{"className":1707},[],[1709],{"type":28,"value":247},{"type":22,"tag":613,"props":1711,"children":1712},{},[1713],{"type":28,"value":1714},"速度快、成本低",{"type":22,"tag":591,"props":1716,"children":1717},{},[1718,1723,1731],{"type":22,"tag":613,"props":1719,"children":1720},{},[1721],{"type":28,"value":1722},"多文件重构、架构设计",{"type":22,"tag":613,"props":1724,"children":1725},{},[1726],{"type":22,"tag":139,"props":1727,"children":1729},{"className":1728},[],[1730],{"type":28,"value":370},{"type":22,"tag":613,"props":1732,"children":1733},{},[1734],{"type":28,"value":1735},"推理能力更强",{"type":22,"tag":591,"props":1737,"children":1738},{},[1739,1744,1753],{"type":22,"tag":613,"props":1740,"children":1741},{},[1742],{"type":28,"value":1743},"超长文档/大项目分析",{"type":22,"tag":613,"props":1745,"children":1746},{},[1747],{"type":22,"tag":139,"props":1748,"children":1750},{"className":1749},[],[1751],{"type":28,"value":1752},"deepseek-v4-pro[1m]",{"type":22,"tag":613,"props":1754,"children":1755},{},[1756],{"type":28,"value":1757},"支持 1M 上下文",{"type":22,"tag":31,"props":1759,"children":1760},{},[1761,1766],{"type":22,"tag":41,"props":1762,"children":1763},{},[1764],{"type":28,"value":1765},"推荐策略",{"type":28,"value":1767},"：日常用 Flash 当主力省钱，复杂任务临时切到 Pro。",{"type":22,"tag":63,"props":1769,"children":1770},{},[],{"type":22,"tag":67,"props":1772,"children":1774},{"id":1773},"总结",[1775],{"type":28,"value":1773},{"type":22,"tag":583,"props":1777,"children":1778},{},[1779,1800],{"type":22,"tag":587,"props":1780,"children":1781},{},[1782],{"type":22,"tag":591,"props":1783,"children":1784},{},[1785,1790,1795],{"type":22,"tag":595,"props":1786,"children":1787},{},[1788],{"type":28,"value":1789},"方法",{"type":22,"tag":595,"props":1791,"children":1792},{},[1793],{"type":28,"value":1794},"适用人群",{"type":22,"tag":595,"props":1796,"children":1797},{},[1798],{"type":28,"value":1799},"特点",{"type":22,"tag":606,"props":1801,"children":1802},{},[1803,1820,1837,1855,1872],{"type":22,"tag":591,"props":1804,"children":1805},{},[1806,1810,1815],{"type":22,"tag":613,"props":1807,"children":1808},{},[1809],{"type":28,"value":45},{"type":22,"tag":613,"props":1811,"children":1812},{},[1813],{"type":28,"value":1814},"所有人",{"type":22,"tag":613,"props":1816,"children":1817},{},[1818],{"type":28,"value":1819},"最简单，临时切换",{"type":22,"tag":591,"props":1821,"children":1822},{},[1823,1827,1832],{"type":22,"tag":613,"props":1824,"children":1825},{},[1826],{"type":28,"value":574},{"type":22,"tag":613,"props":1828,"children":1829},{},[1830],{"type":28,"value":1831},"需要多供应商切换",{"type":22,"tag":613,"props":1833,"children":1834},{},[1835],{"type":28,"value":1836},"GUI 可视化，一键切换",{"type":22,"tag":591,"props":1838,"children":1839},{},[1840,1845,1850],{"type":22,"tag":613,"props":1841,"children":1842},{},[1843],{"type":28,"value":1844},"修改 settings.json",{"type":22,"tag":613,"props":1846,"children":1847},{},[1848],{"type":28,"value":1849},"固定使用 DeepSeek",{"type":22,"tag":613,"props":1851,"children":1852},{},[1853],{"type":28,"value":1854},"一劳永逸",{"type":22,"tag":591,"props":1856,"children":1857},{},[1858,1862,1867],{"type":22,"tag":613,"props":1859,"children":1860},{},[1861],{"type":28,"value":1110},{"type":22,"tag":613,"props":1863,"children":1864},{},[1865],{"type":28,"value":1866},"CLI 爱好者",{"type":22,"tag":613,"props":1868,"children":1869},{},[1870],{"type":28,"value":1871},"命令行快速切换",{"type":22,"tag":591,"props":1873,"children":1874},{},[1875,1880,1885],{"type":22,"tag":613,"props":1876,"children":1877},{},[1878],{"type":28,"value":1879},"ccenv-cli / ccx",{"type":22,"tag":613,"props":1881,"children":1882},{},[1883],{"type":28,"value":1884},"环境管理需求",{"type":22,"tag":613,"props":1886,"children":1887},{},[1888],{"type":28,"value":1889},"多配置管理",{"type":22,"tag":31,"props":1891,"children":1892},{},[1893,1895,1900,1902,1907],{"type":28,"value":1894},"以上所有方法的核心原理都是一样的——修改 Claude Code 的 ",{"type":22,"tag":139,"props":1896,"children":1898},{"className":1897},[],[1899],{"type":28,"value":845},{"type":28,"value":1901}," 指向 DeepSeek 的兼容接口 ",{"type":22,"tag":139,"props":1903,"children":1905},{"className":1904},[],[1906],{"type":28,"value":186},{"type":28,"value":1908},"。选择最适合你的方式即可。",{"type":22,"tag":1910,"props":1911,"children":1912},"style",{},[1913],{"type":28,"value":1914},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html .sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}html.sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}",{"title":7,"searchDepth":155,"depth":155,"links":1916},[1917,1923,1928,1929,1930,1931,1932],{"id":69,"depth":155,"text":72,"children":1918},[1919,1920,1921,1922],{"id":81,"depth":194,"text":84},{"id":108,"depth":194,"text":111},{"id":377,"depth":194,"text":380},{"id":547,"depth":194,"text":550},{"id":561,"depth":155,"text":564,"children":1924},[1925,1926,1927],{"id":579,"depth":194,"text":579},{"id":667,"depth":194,"text":670},{"id":727,"depth":194,"text":727},{"id":770,"depth":155,"text":773},{"id":1096,"depth":155,"text":1099},{"id":1479,"depth":155,"text":1482},{"id":1664,"depth":155,"text":1664},{"id":1773,"depth":155,"text":1773},"markdown","content:blog:claude-code-deepseek.md","content","blog/claude-code-deepseek.md","blog/claude-code-deepseek","md",1780733631905]