Support OpenAI-compatible gateways (OpenRouter) via vendor/model names
維護者通常 1 天內回覆
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 25/100
- Issue 類型
- 功能
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- typescript
- 領域
- ai
研究方向
Start with build_model, the factory that rejects LLM_MODEL values lacking a claude-, gpt- or chat-latest prefix, and check how request_model pins the BYOK base URL so that path stays unchanged. Linked PR #100 is already open against this work, so review or build on it rather than starting a parallel change. Done means a vendor/model name routes to ChatOpenAI, existing prefixes behave as before, and a test and the .env.example note cover the new case.
由索引模型根據 Issue 內容生成。
描述
Problem
build_model only accepts claude-*, gpt-* and chat-latest. OpenAI-compatible gateways such as OpenRouter use vendor/model names (e.g. deepseek/deepseek-chat, anthropic/claude-sonnet-...), so they're rejected at startup with "LLM_MODEL must name a supported provider", even though ChatOpenAI can already talk to them.
Proposal
Route LLM_MODEL values containing / through ChatOpenAI as well. The OpenAI SDK already reads OPENAI_BASE_URL, so a self-hoster sets:
OPENAI_API_KEY=<gateway key>
OPENAI_BASE_URL=https://openrouter.ai/api/v1
LLM_MODEL=deepseek/deepseek-chat
No new settings or dependencies. Existing prefixes behave as before. BYOK browser keys keep using OpenAI, since request_model pins https://api.openai.com/v1.
This makes it easy to self-host with cheaper or alternative models. I have a small PR ready (factory change, a test, and .env.example/docs updates) and am happy to adjust it.
- 主要語言
- TypeScript
- 星號
- 3.9k
- 分支
- 414
- 平均合併
- 4 小時
- 30 天內合併 PR
- 6
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
CopilotKit/OpenIntelligentUI 的其他 Issue
-
Script dedup key truncation may cause collisions可能已有人在做 @saschabuehrle 於 216 天前認領。 未關閉bug
難度 2/5 1-3 小時 新手友好度 72/100
CopilotKit/OpenIntelligentUI#37 ·
維護者通常 1 天內回覆
-
enhancement
難度 2/5 1-3 小時 新手友好度 72/100
CopilotKit/OpenIntelligentUI#29 ·
維護者通常 1 天內回覆
-
Self-host with Docker Compose and optional server-held keys可能已有人在做 @kannan983 於 16 天前認領。 未關閉
難度 4/5 3-5 天 新手友好度 18/100
CopilotKit/OpenIntelligentUI#98 ·
維護者通常 1 天內回覆
-
UI未關閉
難度 5/5 一週以上 新手友好度 8/100
CopilotKit/OpenIntelligentUI#96 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 48/100
CopilotKit/OpenIntelligentUI#87 · 2 則留言 ·
維護者通常 1 天內回覆
查看 CopilotKit/OpenIntelligentUI 的全部 Issue
相似的 Issue
-
ready
難度 2/5 1-3 小時 新手友好度 63/100
wheresrhys/totf#1214 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
CodeChefVIT/ffcs#281 ·
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 83/100
endora-commerce/endora-commerce#451 ·
維護者通常 1 天內回覆
-
enhancement
難度 2/5 1-3 小時 新手友好度 65/100
vetro-protocol/vetro-monorepo#1007 ·
維護者通常 1 天內回覆