fix: update MiniMax API URL from .io to .com domain
- Changed API endpoint from api.minimax.io to api.minimaxi.com - Updated all test files, docs, and configuration examples - Aligns with official MiniMax documentation
This commit is contained in:
parent
fdcac0ccf4
commit
8beea7cd6e
@ -493,7 +493,7 @@ Save to `~/.clawdbot/moltbot.json` and you can DM the bot from that number.
|
||||
models: {
|
||||
providers: {
|
||||
minimax: {
|
||||
baseUrl: "https://api.minimax.io/anthropic",
|
||||
baseUrl: "https://api.minimaxi.com/anthropic",
|
||||
api: "anthropic-messages",
|
||||
apiKey: "${MINIMAX_API_KEY}"
|
||||
}
|
||||
|
||||
@ -2535,7 +2535,7 @@ Use MiniMax M2.1 directly without LM Studio:
|
||||
mode: "merge",
|
||||
providers: {
|
||||
minimax: {
|
||||
baseUrl: "https://api.minimax.io/anthropic",
|
||||
baseUrl: "https://api.minimaxi.com/anthropic",
|
||||
apiKey: "${MINIMAX_API_KEY}",
|
||||
api: "anthropic-messages",
|
||||
models: [
|
||||
|
||||
@ -52,7 +52,7 @@ Configure via CLI:
|
||||
mode: "merge",
|
||||
providers: {
|
||||
minimax: {
|
||||
baseUrl: "https://api.minimax.io/anthropic",
|
||||
baseUrl: "https://api.minimaxi.com/anthropic",
|
||||
apiKey: "${MINIMAX_API_KEY}",
|
||||
api: "anthropic-messages",
|
||||
models: [
|
||||
@ -145,7 +145,7 @@ Use the interactive config wizard to set MiniMax without editing JSON:
|
||||
|
||||
## Configuration options
|
||||
|
||||
- `models.providers.minimax.baseUrl`: prefer `https://api.minimax.io/anthropic` (Anthropic-compatible); `https://api.minimax.io/v1` is optional for OpenAI-compatible payloads.
|
||||
- `models.providers.minimax.baseUrl`: prefer `https://api.minimaxi.com/anthropic` (Anthropic-compatible); `https://api.minimaxi.com/v1` is optional for OpenAI-compatible payloads.
|
||||
- `models.providers.minimax.api`: prefer `anthropic-messages`; `openai-completions` is optional for OpenAI-compatible payloads.
|
||||
- `models.providers.minimax.apiKey`: MiniMax API key (`MINIMAX_API_KEY`).
|
||||
- `models.providers.minimax.models`: define `id`, `name`, `reasoning`, `contextWindow`, `maxTokens`, `cost`.
|
||||
|
||||
@ -86,7 +86,7 @@ async function main(): Promise<void> {
|
||||
}
|
||||
|
||||
const minimaxBaseUrl =
|
||||
process.env.MINIMAX_BASE_URL?.trim() || "https://api.minimax.io/v1";
|
||||
process.env.MINIMAX_BASE_URL?.trim() || "https://api.minimaxi.com/v1";
|
||||
const minimaxModelId =
|
||||
process.env.MINIMAX_MODEL?.trim() || "MiniMax-M2.1";
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ function coerceApiHost(params: {
|
||||
params.apiHost?.trim() ||
|
||||
env.MINIMAX_API_HOST?.trim() ||
|
||||
params.modelBaseUrl?.trim() ||
|
||||
"https://api.minimax.io";
|
||||
"https://api.minimaxi.com";
|
||||
|
||||
try {
|
||||
const url = new URL(raw);
|
||||
@ -24,7 +24,7 @@ function coerceApiHost(params: {
|
||||
const url = new URL(`https://${raw}`);
|
||||
return url.origin;
|
||||
} catch {
|
||||
return "https://api.minimax.io";
|
||||
return "https://api.minimaxi.com";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ import { describe, expect, it } from "vitest";
|
||||
import { isTruthyEnvValue } from "../infra/env.js";
|
||||
|
||||
const MINIMAX_KEY = process.env.MINIMAX_API_KEY ?? "";
|
||||
const MINIMAX_BASE_URL = process.env.MINIMAX_BASE_URL?.trim() || "https://api.minimax.io/anthropic";
|
||||
const MINIMAX_BASE_URL = process.env.MINIMAX_BASE_URL?.trim() || "https://api.minimaxi.com/anthropic";
|
||||
const MINIMAX_MODEL = process.env.MINIMAX_MODEL?.trim() || "MiniMax-M2.1";
|
||||
const LIVE = isTruthyEnvValue(process.env.MINIMAX_LIVE_TEST) || isTruthyEnvValue(process.env.LIVE);
|
||||
|
||||
|
||||
@ -56,7 +56,7 @@ describe("models-config", () => {
|
||||
models: {
|
||||
providers: {
|
||||
minimax: {
|
||||
baseUrl: "https://api.minimax.io/anthropic",
|
||||
baseUrl: "https://api.minimaxi.com/anthropic",
|
||||
api: "anthropic-messages",
|
||||
models: [
|
||||
{
|
||||
|
||||
@ -174,7 +174,7 @@ describe("runEmbeddedPiAgent", () => {
|
||||
models: {
|
||||
providers: {
|
||||
minimax: {
|
||||
baseUrl: "https://api.minimax.io/anthropic",
|
||||
baseUrl: "https://api.minimaxi.com/anthropic",
|
||||
api: "anthropic-messages",
|
||||
apiKey: "sk-minimax-test",
|
||||
models: [
|
||||
|
||||
@ -195,7 +195,7 @@ describe("directive behavior", () => {
|
||||
mode: "merge",
|
||||
providers: {
|
||||
minimax: {
|
||||
baseUrl: "https://api.minimax.io/anthropic",
|
||||
baseUrl: "https://api.minimaxi.com/anthropic",
|
||||
api: "anthropic-messages",
|
||||
models: [{ id: "MiniMax-M2.1", name: "MiniMax M2.1" }],
|
||||
},
|
||||
|
||||
@ -218,7 +218,7 @@ describe("directive behavior", () => {
|
||||
mode: "merge",
|
||||
providers: {
|
||||
minimax: {
|
||||
baseUrl: "https://api.minimax.io/anthropic",
|
||||
baseUrl: "https://api.minimaxi.com/anthropic",
|
||||
apiKey: "sk-test",
|
||||
api: "anthropic-messages",
|
||||
models: [{ id: "MiniMax-M2.1", name: "MiniMax M2.1" }],
|
||||
@ -262,7 +262,7 @@ describe("directive behavior", () => {
|
||||
mode: "merge",
|
||||
providers: {
|
||||
minimax: {
|
||||
baseUrl: "https://api.minimax.io/anthropic",
|
||||
baseUrl: "https://api.minimaxi.com/anthropic",
|
||||
apiKey: "sk-test",
|
||||
api: "anthropic-messages",
|
||||
models: [
|
||||
|
||||
@ -123,7 +123,7 @@ describe("trigger handling", () => {
|
||||
models: {
|
||||
providers: {
|
||||
minimax: {
|
||||
baseUrl: "https://api.minimax.io/anthropic",
|
||||
baseUrl: "https://api.minimaxi.com/anthropic",
|
||||
api: "anthropic-messages",
|
||||
},
|
||||
},
|
||||
@ -147,7 +147,7 @@ describe("trigger handling", () => {
|
||||
const text = Array.isArray(res) ? res[0]?.text : res?.text;
|
||||
const normalized = normalizeTestText(text ?? "");
|
||||
expect(normalized).toContain(
|
||||
"[minimax] endpoint: https://api.minimax.io/anthropic api: anthropic-messages auth:",
|
||||
"[minimax] endpoint: https://api.minimaxi.com/anthropic api: anthropic-messages auth:",
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import type { ModelDefinitionConfig } from "../config/types.js";
|
||||
|
||||
export const DEFAULT_MINIMAX_BASE_URL = "https://api.minimax.io/v1";
|
||||
export const MINIMAX_API_BASE_URL = "https://api.minimax.io/anthropic";
|
||||
export const DEFAULT_MINIMAX_BASE_URL = "https://api.minimaxi.com/v1";
|
||||
export const MINIMAX_API_BASE_URL = "https://api.minimaxi.com/anthropic";
|
||||
export const MINIMAX_HOSTED_MODEL_ID = "MiniMax-M2.1";
|
||||
export const MINIMAX_HOSTED_MODEL_REF = `minimax/${MINIMAX_HOSTED_MODEL_ID}`;
|
||||
export const DEFAULT_MINIMAX_CONTEXT_WINDOW = 200000;
|
||||
|
||||
@ -168,7 +168,7 @@ describe("applyMinimaxApiConfig", () => {
|
||||
it("adds minimax provider with correct settings", () => {
|
||||
const cfg = applyMinimaxApiConfig({});
|
||||
expect(cfg.models?.providers?.minimax).toMatchObject({
|
||||
baseUrl: "https://api.minimax.io/anthropic",
|
||||
baseUrl: "https://api.minimaxi.com/anthropic",
|
||||
api: "anthropic-messages",
|
||||
});
|
||||
});
|
||||
@ -244,7 +244,7 @@ describe("applyMinimaxApiConfig", () => {
|
||||
},
|
||||
},
|
||||
});
|
||||
expect(cfg.models?.providers?.minimax?.baseUrl).toBe("https://api.minimax.io/anthropic");
|
||||
expect(cfg.models?.providers?.minimax?.baseUrl).toBe("https://api.minimaxi.com/anthropic");
|
||||
expect(cfg.models?.providers?.minimax?.api).toBe("anthropic-messages");
|
||||
expect(cfg.models?.providers?.minimax?.apiKey).toBe("old-key");
|
||||
expect(cfg.models?.providers?.minimax?.models.map((m) => m.id)).toEqual([
|
||||
|
||||
@ -212,7 +212,7 @@ describe("config identity defaults", () => {
|
||||
mode: "merge",
|
||||
providers: {
|
||||
minimax: {
|
||||
baseUrl: "https://api.minimax.io/anthropic",
|
||||
baseUrl: "https://api.minimaxi.com/anthropic",
|
||||
apiKey: "",
|
||||
api: "anthropic-messages",
|
||||
models: [
|
||||
@ -245,7 +245,7 @@ describe("config identity defaults", () => {
|
||||
const { loadConfig } = await import("./config.js");
|
||||
const cfg = loadConfig();
|
||||
|
||||
expect(cfg.models?.providers?.minimax?.baseUrl).toBe("https://api.minimax.io/anthropic");
|
||||
expect(cfg.models?.providers?.minimax?.baseUrl).toBe("https://api.minimaxi.com/anthropic");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@ -1022,7 +1022,7 @@ describeLive("gateway live (dev agent, profile keys)", () => {
|
||||
const minimaxAnthropic = buildMinimaxProviderOverride({
|
||||
cfg,
|
||||
api: "anthropic-messages",
|
||||
baseUrl: "https://api.minimax.io/anthropic",
|
||||
baseUrl: "https://api.minimaxi.com/anthropic",
|
||||
});
|
||||
if (minimaxAnthropic) {
|
||||
await runGatewayModelSuite({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user