RRoutify · 輕舟

整合 · Claude Code

Claude Code 隨處可用,Anthropic 協定全保留。

Routify 提供原生 Anthropic Messages 端點。cache_control、anthropic-version、anthropic-beta — 所有 header 原樣轉發。可選擇底層切到 DeepSeek / Kimi / GLM,5-10 倍降本,CLAUDE.md 一行不動。

30 秒接入

Claude Code uses an OpenAI-compatible base URL. Override ANTHROPIC_BASE_URL and you’re done — no plugin, no extension, no proxy.

💡 日常補全設 ANTHROPIC_MODEL_OVERRIDE=deepseek-chat,長任務再 unset 切回 Claude。一週下來通常省 80% 而不動一行程式碼。

~/.claudecoderc
# Anthropic-protocol passthrough (recommended)
export ANTHROPIC_BASE_URL=https://routify.bytedance.city/v1/anthropic
export ANTHROPIC_API_KEY=rtf_xxx_your_routify_key
claude

# Optional: route Claude Code under-the-hood to DeepSeek
export ANTHROPIC_MODEL_OVERRIDE=deepseek-chat
claude

# Or use the OpenAI-compatible endpoint with the routify-anthropic shim:
export OPENAI_BASE_URL=https://routify.bytedance.city/v1
export OPENAI_API_KEY=rtf_xxx_your_routify_key

ANTHROPIC_MODEL_OVERRIDE 是 Routify 擴充,Anthropic 不識別。設定後告知 Routify 將 Messages 請求翻譯到目標上游模型,再翻譯回來。

推薦設定

為 Claude Code 優選。

三套實戰驗證過的模型組合。按你的優先順序選一套,直接複製 model id 接入。

省錢檔

設 ANTHROPIC_MODEL_OVERRIDE=deepseek-chat 把底層模型替換為 DeepSeek V3.2。Claude Code 仍走 Anthropic 協定,但每個請求落到 DeepSeek。tool 呼叫、JSON 模式、串流回應均自動轉換。適合模板化程式碼比例高的專案。

成本說明

相比 Opus 降本約 95%。複雜重構會有品質下降——那些場景留給 Frontier 檔。

主模型

備用模型鏈

主模型超預算或當機時,智慧路由自動切到鏈上下一個。

常見問題

prompt 快取還能用嗎?

可以。cache_control header 原樣轉發,快取命中率與 Anthropic 直連一致。(替換模式下快取失效,因為上游不是 Anthropic。)

Claude Code 的工具呼叫能用嗎?

Pure / Cost Hybrid 模式下原生支援。Aggressive Substitute 模式下我們把 Anthropic tool_use blocks ↔ OpenAI tool_calls 雙向翻譯,工具定義不用改。

anthropic-beta header 還能透傳嗎?

Pass-through 模式下每個 Anthropic header 都透傳。替換模式會剝離 Anthropic 專屬 header,因為上游不識別。

Computer Use / Bash 工具呢?

Computer Use 是 Anthropic 獨有 — Pure 模式透傳,Substitute 模式禁用。Bash 工具兩種模式都能用。

Mac / Linux / Windows 都支援嗎?

都支援。Claude Code CLI 直接讀 ANTHROPIC_BASE_URL。

能用自己的 Anthropic key 走 Pure 檔嗎?

可以——2026 Q3 上線 BYOK。屆時純 pass-through,Routify 不加價,僅收 0-5% 路由費。

30 秒上線 Claude Code。

$5 免費額度,無需信用卡。

Claude Code — 原生 Anthropic 協定,國產模型價格 · Routify