BYOK minimax_api provider cannot work with OpenAI-compatible third-party relay (X-Api-Key hardcoded) - mobile channel messages fail with 'login fail'
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- api, authentication, mobile
Research direction
Start at parseMinimaxApiConfig and apiKeyAuth, then trace how mobile-channel requests resolve the unprefixed MiniMax model versus custom_provider:minimax-2. Use the listed runtime log entries to reproduce the failure. Done means the mobile channel can use the configured relay with Bearer authentication or consistently uses the selected custom provider without falling back to minimax_api.
Written by the indexing model from the issue text.
Description
Environment
- MiniMax Code 3.0.60, macOS
minimaxModelSource: minimax_api_key- A custom provider (
openai-completions+Authorization: Bearer) works fine for desktop chat and is the default model
Symptom
Messages sent from the mobile app (connected to desktop) fail with:
BYOK provider minimax_api upstream error: login fail: Please carry the API secret key in the 'X-Api-Key' field of the request header
Root cause analysis (verified against app behavior)
- The
minimax_apiprovider defaults tohttps://api.minimaxi.com/anthropic(official endpoint). The configuredminimax_api.apiKeyis a key for a third-party OpenAI-compatible relay. parseMinimaxApiConfigonly acceptsapiKeyandbaseURL— there is no way to configure a custom auth header for the upstream.- The SDK's
apiKeyAuthsends the key asX-Api-Keyheader, but the relay only acceptsAuthorization: Bearer(verified:X-Api-Key→401 Missing API key;Bearer→200 OK). The relay does expose an Anthropic-compatible endpoint (/v1/messages). - In the same turn,
custom_provider:minimax-2(openai-completions, Bearer) succeeds whileminimax_apifails — some mobile-channel requests resolve to the unprefixed builtin MiniMax model and hitminimax_api.
Expected behavior
- Allow
minimax_api(or custom providers) to configure auth asAuthorization: Bearer/authToken, so BYOK users with third-party relays can use them for the mobile channel. - Or: mobile-channel auxiliary requests should use the same
custom_providermodel as the main conversation instead of falling back tominimax_api.
Logs
~/.minimax/v2/observability/logs/runtime-2026081123.log — entries BYOK provider minimax_api upstream error: login fail: ... at 23:40 / 23:45 / 23:47
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 141
- Avg merge
- 2h 26m
- Merged PRs (30d)
- 65
Contributor 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 cli needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
MiniMax-AI/minimax-code#128 · 2 comments ·
-
bug desktop
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
MiniMax-AI/minimax-code#87 · 2 comments · 2 reactions ·
-
bug desktop needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
MiniMax-AI/minimax-code#80 ·
-
bug desktop needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
MiniMax-AI/minimax-code#66 ·
-
desktop enhancement needs-triage
Difficulty 3/5 1-2 days Newbie friendliness 58/100
MiniMax-AI/minimax-code#292 ·
All issues in MiniMax-AI/minimax-code
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·