From 2e231d09ec0407c0f5e8efb3b67f4e0f217a4a05 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 17 Jan 2026 19:45:48 +0000 Subject: [PATCH] Infra: update MiniMax usage endpoint --- CHANGELOG.md | 1 + src/infra/provider-usage.fetch.minimax.ts | 2 +- src/infra/provider-usage.test.ts | 8 ++++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d046e008c..82ae2a57e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ Docs: https://docs.clawd.bot ### Fixes - Doctor: avoid re-adding WhatsApp ack reaction config when only legacy auth files exist. (#1087) — thanks @YuriNachos. +- Providers: update MiniMax coding plan usage endpoint for API keys. ## 2026.1.16-2 diff --git a/src/infra/provider-usage.fetch.minimax.ts b/src/infra/provider-usage.fetch.minimax.ts index 071b1580a..16a1ab248 100644 --- a/src/infra/provider-usage.fetch.minimax.ts +++ b/src/infra/provider-usage.fetch.minimax.ts @@ -283,7 +283,7 @@ export async function fetchMinimaxUsage( fetchFn: typeof fetch, ): Promise { const res = await fetchJson( - "https://api.minimax.io/v1/coding_plan/remains", + "https://api.minimaxi.com/v1/api/openplatform/coding_plan/remains", { method: "GET", headers: { diff --git a/src/infra/provider-usage.test.ts b/src/infra/provider-usage.test.ts index d93135ec9..7172c2ce9 100644 --- a/src/infra/provider-usage.test.ts +++ b/src/infra/provider-usage.test.ts @@ -103,7 +103,7 @@ describe("provider usage loading", () => { }, }); } - if (url.includes("api.minimax.io/v1/coding_plan/remains")) { + if (url.includes("api.minimaxi.com/v1/api/openplatform/coding_plan/remains")) { return makeResponse(200, { base_resp: { status_code: 0, status_msg: "ok" }, data: { @@ -147,7 +147,7 @@ describe("provider usage loading", () => { const mockFetch = vi.fn, ReturnType>(async (input) => { const url = typeof input === "string" ? input : input instanceof URL ? input.toString() : input.url; - if (url.includes("api.minimax.io/v1/coding_plan/remains")) { + if (url.includes("api.minimaxi.com/v1/api/openplatform/coding_plan/remains")) { return makeResponse(200, { base_resp: { status_code: 0, status_msg: "ok" }, data: { @@ -185,7 +185,7 @@ describe("provider usage loading", () => { const mockFetch = vi.fn, ReturnType>(async (input) => { const url = typeof input === "string" ? input : input instanceof URL ? input.toString() : input.url; - if (url.includes("api.minimax.io/v1/coding_plan/remains")) { + if (url.includes("api.minimaxi.com/v1/api/openplatform/coding_plan/remains")) { return makeResponse(200, { base_resp: { status_code: 0, status_msg: "ok" }, data: { @@ -220,7 +220,7 @@ describe("provider usage loading", () => { const mockFetch = vi.fn, ReturnType>(async (input) => { const url = typeof input === "string" ? input : input instanceof URL ? input.toString() : input.url; - if (url.includes("api.minimax.io/v1/coding_plan/remains")) { + if (url.includes("api.minimaxi.com/v1/api/openplatform/coding_plan/remains")) { return makeResponse(200, { base_resp: { status_code: 0, status_msg: "ok" }, model_remains: [