BYOK connectivity and model discovery append endpoint paths after URL query parameters
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
Hướng nghiên cứu
Bắt đầu với packages/local-runtime-v2/src/service/model-system/connectivity/provider-request.ts, dòng 49–91, và lần theo cách nó được sử dụng trong kiểm tra kết nối và phát hiện model. Xem xét việc xác thực cấu hình được đề xuất cùng test suite liên quan gồm năm tệp, sau đó đảm bảo phạm vi kiểm thử hồi quy phân biệt được URL thuần, query string, fragment và việc chuẩn hóa hậu tố endpoint. Công việc được xem là hoàn tất khi chính sách URL được chọn là rõ ràng và tất cả các test liên quan đều đạt.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I noticed a URL construction edge case while looking at BYOK gateway support. A base URL with a query string is accepted by the provider configuration code, but the connectivity helpers append the endpoint after the query string.
For example:
providerCompletionUrl('openai-completions', 'https://gw.example/v1?tenant=a')
// actual: https://gw.example/v1?tenant=a/chat/completions
The resulting request still has /v1 as its pathname; /chat/completions becomes part of the tenant parameter. providerModelsUrls() has the same issue with /models. A fragment has a similar effect: the appended endpoint becomes part of the fragment instead of the request path.
I checked this against source commit 33b259bbbeb1c16433390869938191d09bdb0680 on Windows, executing the URL-building functions extracted from the source after stripping TypeScript types. This is a helper-level reproduction, not a live provider or full CLI test.
Relevant code: provider-request.ts, lines 49–91. These helpers are used by the connectivity test and model discovery paths.
Would you prefer to support query parameters on gateway base URLs, or reject them when saving the configuration? Either seems reasonable, but silently turning the endpoint into query text is confusing. If query parameters are supported, the endpoint should be added to the URL pathname while preserving the query. Fragments could be rejected explicitly.
A small regression test covering plain URLs, query strings, fragments, and the existing endpoint-suffix normalization should cover this. I searched the existing issues and did not find this particular case.
Patch prepared
I've pushed a proposed fix to my fork (8b7915e). It rejects query strings/fragments before saving or using the URL, while keeping older entries readable and editable. I chose rejection because the inference SDKs have the same direct-append behavior; fixing just the probe would be misleading.
The related five-file suite passes all 266 tests, and typecheck passes. Full verification still stops at two release-tool assertions that also fail on the unchanged baseline here; the Windows build hits an existing resource-copy EIO error. I haven't run live-provider acceptance.
I tried opening a draft PR, but GitHub rejected CreatePullRequest for this account. Leaving the patch here for review under the collaborator-only contribution policy; no upstream PR has been created.
- Ngôn ngữ chính
- TypeScript
- Star
- 2k
- Fork
- 250
- Merge trung bình
- 7 giờ 9 phút
- Pull request đã merge (30 ngày)
- 131
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của MiniMax-AI/minimax-code
-
bug needs-triage tui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
MiniMax-AI/minimax-code#393 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug cli documentation needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
MiniMax-AI/minimax-code#299 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug cli needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
MiniMax-AI/minimax-code#128 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug desktop
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
MiniMax-AI/minimax-code#87 · 2 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug desktop needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
MiniMax-AI/minimax-code#80 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của MiniMax-AI/minimax-code
Issue tương tự
-
Upgrade node-libzim to 4.7.0Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
openzim/mwoffliner#2933 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Use the README category name for website links and submissionsCó thể đã có người làm @dajiaohuang đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
birobirobiro/awesome-shadcn-ui#647 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Add: Valea Prahovei TV RO SDĐang mởcheck:passed streams:add
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Urigo/accounter-fullstack#4604 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày