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

BYOK connectivity and model discovery append endpoint paths after URL query parameters

Đang mở
#182 3 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

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

Từ ngày 19/9/2026.

  • #186 của @hetaoBackend — đang mở

Đá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
Lĩnh vực
api, backend

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ả

bug needs-triage

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

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 MiniMax-AI/minimax-code

Tất cả issue của MiniMax-AI/minimax-code

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.