Skip to content

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

Description

@tim-korso

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions