Support custom API base URL and API key (OpenAI-compatible provider)
還沒有人認領這個 Issue。
評估
研究方向
先追蹤現有的 COMMANDCODE_API_URL 設定與目前的驗證路徑。實作提議的 COMMANDCODE_BASE_URL 與 COMMANDCODE_API_KEY 來源,包括 CLI、設定檔、環境,以及目前驗證的優先順序,並支援選用的自訂模型中繼資料。當不需要 Command Code 訂閱金鑰即可使用相容於 OpenAI 的外部端點與金鑰時,即表示完成。
由索引模型根據 Issue 內容生成。
描述
Feature Request
Allow commandcode to use a custom API base URL and API key from external providers (e.g. any OpenAI-compatible gateway), instead of being hardwired to api.commandcode.ai.
Motivation
Right now all models are routed through Command Code's own backend (api.commandcode.ai). Users on other providers — or self-hosted / relay gateways that expose an OpenAI-compatible /v1 endpoint — cannot point commandcode at them. The only knob that exists, COMMANDCODE_API_URL, switches between Command Code's own prod/staging/local environments; it does not accept an external provider base URL.
Proposed behavior
Something like the existing opencode / Claude Code config model:
- A config file and/or env vars, e.g.:
COMMANDCODE_BASE_URL=https://my-provider.example.com/v1COMMANDCODE_API_KEY=sk-...
- Optional custom model list (id → display name, context window, modalities) when pointing at a non-Command-Code backend.
- Priority: CLI flag > config file > env var > current auth.
Use case
I maintain an opencode.jsonc with a custom provider (npm: @ai-sdk/openai-compatible, baseURL + apiKey) and would love to drive commandcode with the same endpoint/key instead of a separate Command Code subscription key.
Environment
commandcode1.11.0- Linux, Node v26
- 主要語言
- 沒有語言資料
- 星號
- 4k
- 分支
- 350
- PR 合併指標
- 30 天內沒有已合併 PR
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
CommandCodeAI/command-code 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 68/100
CommandCodeAI/command-code#855 ·
-
難度 2/5 1-3 小時 新手友好度 78/100
CommandCodeAI/command-code#841 · 1 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 68/100
CommandCodeAI/command-code#655 · 1 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 68/100
CommandCodeAI/command-code#608 ·
-
難度 3/5 1-2 天 新手友好度 70/100
CommandCodeAI/command-code#893 ·
查看 CommandCodeAI/command-code 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
use-agent-os/agent-os#3276 ·
-
good first issue refactor
難度 2/5 1-3 小時 新手友好度 72/100
-
難度 1/5 1 小時以內 新手友好度 90/100
-
難度 2/5 1-3 小時 新手友好度 86/100
-
area/sessions comp/agent P2 tool/skills type/perf
難度 2/5 1-3 小時 新手友好度 82/100
NousResearch/hermes-agent#117788 ·