BYOK connectivity and model discovery append endpoint paths after URL query parameters
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
packages/local-runtime-v2/src/service/model-system/connectivity/provider-request.ts の49~91行目から始め、接続性テストとモデル検出からの使用箇所を追跡してください。提案されている設定検証と、それに関連する5ファイルのテストスイートを確認し、回帰テストのカバレッジでプレーンなURL、クエリ文字列、フラグメント、endpoint-suffix の正規化を区別できるようにしてください。選択したURLポリシーが明示的で、関連するすべてのテストが通れば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 2k
- フォーク
- 250
- 平均マージ
- 7時間 8分
- マージ済み PR(30日)
- 132
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
MiniMax-AI/minimax-code のほかの issue
-
bug needs-triage tui
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
MiniMax-AI/minimax-code#393 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
bug cli documentation needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
MiniMax-AI/minimax-code#299 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
bug cli needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
MiniMax-AI/minimax-code#128 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
bug desktop
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
MiniMax-AI/minimax-code#87 · コメント 2 件 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
bug desktop needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
MiniMax-AI/minimax-code#80 ·
メンテナーはふだん 1 日以内に返信
MiniMax-AI/minimax-code の issue をすべて見る
似ている issue
-
dx hacktoberfest help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
cloudflare/agents#2498 ·
メンテナーはふだん 1 日以内に返信
-
Missing repro Platform: Android
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
software-mansion/react-native-reanimated#10816 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
e2e-failure ready-to-code
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
redhat-developer/rhdh-plugin-export-overlays#4129 ·
メンテナーはふだん 1 日以内に返信