Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Support OpenAI-compatible gateways (OpenRouter) via vendor/model names

未關閉
#97 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

@kannan983 已經在處理了。

開始於 2026年10月10日。

  • #100 來自 @kannan983 —— 未關閉

評估

難度
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 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

CopilotKit/OpenIntelligentUI 的其他 Issue

查看 CopilotKit/OpenIntelligentUI 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。