Infra: update MiniMax usage endpoint
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -283,7 +283,7 @@ export async function fetchMinimaxUsage(
|
||||
fetchFn: typeof fetch,
|
||||
): Promise<ProviderUsageSnapshot> {
|
||||
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: {
|
||||
|
||||
@@ -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<Parameters<typeof fetch>, ReturnType<typeof fetch>>(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<Parameters<typeof fetch>, ReturnType<typeof fetch>>(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<Parameters<typeof fetch>, ReturnType<typeof fetch>>(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: [
|
||||
|
||||
Reference in New Issue
Block a user