MiniMax-AI / MiniMax-AI/minimax-code

BYOK minimax_api provider cannot work with OpenAI-compatible third-party relay (X-Api-Key hardcoded) - mobile channel messages fail with 'login fail'

Open
#126 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug desktop
Dominant language
TypeScript
Stars
1.3k
Forks
141
Avg merge
2h 45m
Merged PRs (30d)
46

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)

  1. The minimax_api provider defaults to https://api.minimaxi.com/anthropic (official endpoint). The configured minimax_api.apiKey is a key for a third-party OpenAI-compatible relay.
  2. parseMinimaxApiConfig only accepts apiKey and baseURL — there is no way to configure a custom auth header for the upstream.
  3. The SDK's apiKeyAuth sends the key as X-Api-Key header, but the relay only accepts Authorization: Bearer (verified: X-Api-Key401 Missing API key; Bearer200 OK). The relay does expose an Anthropic-compatible endpoint (/v1/messages).
  4. In the same turn, custom_provider:minimax-2 (openai-completions, Bearer) succeeds while minimax_api fails — some mobile-channel requests resolve to the unprefixed builtin MiniMax model and hit minimax_api.

Expected behavior

  • Allow minimax_api (or custom providers) to configure auth as Authorization: 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_provider model as the main conversation instead of falling back to minimax_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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

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.

Assessment

Tech stack
typescript
Domain
api, authentication, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.