BYOK connectivity and model discovery append endpoint paths after URL query parameters
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
Research direction
Start with packages/local-runtime-v2/src/service/model-system/connectivity/provider-request.ts, lines 49–91, and trace its use from connectivity testing and model discovery. Review the proposed configuration validation and the related five-file test suite, then ensure regression coverage distinguishes plain URLs, query strings, fragments, and endpoint-suffix normalization. Done means the chosen URL policy is explicit and all relevant tests pass.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 226
- Avg merge
- 5h 37m
- Merged PRs (30d)
- 128
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MiniMax-AI/minimax-code
-
bug needs-triage tui
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
MiniMax-AI/minimax-code#393 · 3 comments ·
Maintainers usually reply within 1 day
-
bug cli documentation needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
MiniMax-AI/minimax-code#299 · 3 comments ·
Maintainers usually reply within 1 day
-
bug cli needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
MiniMax-AI/minimax-code#128 · 2 comments ·
Maintainers usually reply within 1 day
-
bug desktop
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
MiniMax-AI/minimax-code#87 · 2 comments · 2 reactions ·
Maintainers usually reply within 1 day
-
bug desktop needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
MiniMax-AI/minimax-code#80 ·
Maintainers usually reply within 1 day
All issues in MiniMax-AI/minimax-code
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
MystenLabs/MemWal#1085 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
📕documentation
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
db-ux-design-system/core-web#8343 ·
Maintainers usually reply within 1 day
-
enhancement triage/needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
heygen-com/hyperframes#4944 ·
Maintainers usually reply within 1 day
-
ai-driven-qa bug claude
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
linagora/twake-calendar-frontend#1493 · 1 comment ·
Maintainers usually reply within 1 day