From 24960568862882cafed97c23d055028e2e0a8dba Mon Sep 17 00:00:00 2001 From: hlbbbbbbb Date: Wed, 28 Jan 2026 09:24:40 +0800 Subject: [PATCH] fix(minimax): use correct API endpoint and format MiniMax has updated their API. The previous configuration used an incorrect endpoint (api.minimax.io/anthropic) with anthropic-messages format, which no longer works. Changes: - Update MINIMAX_API_BASE_URL to https://api.minimax.chat/v1 - Change API format from anthropic-messages to openai-completions - Remove minimax from isAnthropicApi check in transcript-policy This fixes the issue where MiniMax API calls return no results. --- src/agents/models-config.providers.ts | 4 ++-- src/agents/transcript-policy.ts | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/agents/models-config.providers.ts b/src/agents/models-config.providers.ts index 76f1c3acd..cb556aced 100644 --- a/src/agents/models-config.providers.ts +++ b/src/agents/models-config.providers.ts @@ -17,7 +17,7 @@ import { discoverVeniceModels, VENICE_BASE_URL } from "./venice-models.js"; type ModelsConfig = NonNullable; export type ProviderConfig = NonNullable[string]; -const MINIMAX_API_BASE_URL = "https://api.minimax.io/anthropic"; +const MINIMAX_API_BASE_URL = "https://api.minimax.chat/v1"; const MINIMAX_DEFAULT_MODEL_ID = "MiniMax-M2.1"; const MINIMAX_DEFAULT_VISION_MODEL_ID = "MiniMax-VL-01"; const MINIMAX_DEFAULT_CONTEXT_WINDOW = 200000; @@ -244,7 +244,7 @@ export function normalizeProviders(params: { function buildMinimaxProvider(): ProviderConfig { return { baseUrl: MINIMAX_API_BASE_URL, - api: "anthropic-messages", + api: "openai-completions", models: [ { id: MINIMAX_DEFAULT_MODEL_ID, diff --git a/src/agents/transcript-policy.ts b/src/agents/transcript-policy.ts index 3ea06ce88..9ae14d38f 100644 --- a/src/agents/transcript-policy.ts +++ b/src/agents/transcript-policy.ts @@ -51,7 +51,8 @@ function isOpenAiProvider(provider?: string | null): boolean { function isAnthropicApi(modelApi?: string | null, provider?: string | null): boolean { if (modelApi === "anthropic-messages") return true; const normalized = normalizeProviderId(provider ?? ""); - return normalized === "anthropic" || normalized === "minimax"; + // MiniMax now uses openai-completions API, not anthropic-messages + return normalized === "anthropic"; } function isMistralModel(params: { provider?: string | null; modelId?: string | null }): boolean {