跳至主要内容

Provider 相容性

這八個 agent 講的模型協定並不相同,所以 alc 會在啟動前先檢查這個組合,而不是 把一個注定失敗的請求送出去。

Agent支援端點協定
Claude CodeAnthropic 相容端點anthropic-messages
Codex CLIOpenAI Responses APIopenai-responses
OpenCode任何 API 相容的 provider皆可
PiAnthropic、OpenAI,或 OpenAI 相容端點皆可
Copilot CLIOpenAI 或 Anthropic 相容端點openai-chatanthropic-messages
GooseOpenAI 或 Anthropic 相容端點openai-chatanthropic-messages
Qwen CodeOpenAI、Anthropic,或 Gemini 相容端點openai-chatanthropic-messages
Kimi Code CLIOpenAI 或 Anthropic 相容端點openai-chatanthropic-messages

不論一個 agent 原生支援什麼,它同樣能透過 Codex 橋接, 只靠一次 codex login 運作。

alc doctor 會把這張表換成你自己的 profile,印出實際的結果。

預設值

選定一個 --kind,端點、金鑰環境變數和起始模型就都填好了。這些值在 config.toml 裡都只是一般欄位,alc config upsert 隨時可以覆寫。

Kind預設端點金鑰環境變數起始模型
anthropichttps://api.anthropic.comANTHROPIC_API_KEYsonnet
openaihttps://api.openai.com/v1OPENAI_API_KEYgpt-6-sol
openrouterhttps://openrouter.ai/api/v1OPENROUTER_API_KEYanthropic/claude-sonnet-4.6
codex—(原生 codex login
ollamahttp://localhost:11434qwen3-coder
vllmhttp://localhost:8000/v1—(預設為停用狀態)
deepseekhttps://api.deepseek.com/v1DEEPSEEK_API_KEYdeepseek-v4-pro
moonshothttps://api.moonshot.ai/v1MOONSHOT_API_KEYkimi-k3
zaihttps://api.z.ai/api/paas/v4ZAI_API_KEYglm-5.3
minimaxhttps://api.minimax.io/v1MINIMAX_API_KEYMiniMax-M3
groqhttps://api.groq.com/openai/v1GROQ_API_KEYllama-3.3-70b-versatile
xaihttps://api.x.ai/v1XAI_API_KEYgrok-build-0.1
googlehttps://generativelanguage.googleapis.com/v1beta/openaiGEMINI_API_KEYgemini-3.7-flash
custom—(自行提供)—(用 --api-key-env 指定名稱)

model ID 換得比 alc 發版還快,所以上面每一個起始模型都只是拿來改的值,不是 provider 今天真的提供什麼的保證。

不用額外設定就能跑 Claude

DeepSeek、Moonshot、Z.ai 與 MiniMax 在 OpenAI 格式的端點之外,各自還公開了 第二個 Anthropic 相容的 base URL,所以 Claude Code 可以直接跑在它們上面:

KindAnthropic 相容 URL
deepseekhttps://api.deepseek.com/anthropic
moonshothttps://api.moonshot.ai/anthropic
zaihttps://api.z.ai/api/anthropic
minimaxhttps://api.minimax.io/anthropic

在本機 Ollama 模型上跑 Claude Code

已移到本機模型:那一頁說明 alc --ollama claude 會設定 什麼,以及在筆電上怎麼讓第一輪不要拖太久。