Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#97 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@kannan983 đang làm issue này rồi.

Từ ngày 10/10/2026.

  • #100 của @kannan983 — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
ai

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
3.9k
Fork
414
Merge trung bình
4 giờ
Pull request đã merge (30 ngày)
6

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của CopilotKit/OpenIntelligentUI

Tất cả issue của CopilotKit/OpenIntelligentUI

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.