Infra: update MiniMax usage endpoint
This commit is contained in:
@@ -11,6 +11,7 @@ Docs: https://docs.clawd.bot
|
|||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
- Doctor: avoid re-adding WhatsApp ack reaction config when only legacy auth files exist. (#1087) — thanks @YuriNachos.
|
- 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
|
## 2026.1.16-2
|
||||||
|
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ export async function fetchMinimaxUsage(
|
|||||||
fetchFn: typeof fetch,
|
fetchFn: typeof fetch,
|
||||||
): Promise<ProviderUsageSnapshot> {
|
): Promise<ProviderUsageSnapshot> {
|
||||||
const res = await fetchJson(
|
const res = await fetchJson(
|
||||||
"https://api.minimax.io/v1/coding_plan/remains",
|
"https://api.minimaxi.com/v1/api/openplatform/coding_plan/remains",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
headers: {
|
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, {
|
return makeResponse(200, {
|
||||||
base_resp: { status_code: 0, status_msg: "ok" },
|
base_resp: { status_code: 0, status_msg: "ok" },
|
||||||
data: {
|
data: {
|
||||||
@@ -147,7 +147,7 @@ describe("provider usage loading", () => {
|
|||||||
const mockFetch = vi.fn<Parameters<typeof fetch>, ReturnType<typeof fetch>>(async (input) => {
|
const mockFetch = vi.fn<Parameters<typeof fetch>, ReturnType<typeof fetch>>(async (input) => {
|
||||||
const url =
|
const url =
|
||||||
typeof input === "string" ? input : input instanceof URL ? input.toString() : input.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, {
|
return makeResponse(200, {
|
||||||
base_resp: { status_code: 0, status_msg: "ok" },
|
base_resp: { status_code: 0, status_msg: "ok" },
|
||||||
data: {
|
data: {
|
||||||
@@ -185,7 +185,7 @@ describe("provider usage loading", () => {
|
|||||||
const mockFetch = vi.fn<Parameters<typeof fetch>, ReturnType<typeof fetch>>(async (input) => {
|
const mockFetch = vi.fn<Parameters<typeof fetch>, ReturnType<typeof fetch>>(async (input) => {
|
||||||
const url =
|
const url =
|
||||||
typeof input === "string" ? input : input instanceof URL ? input.toString() : input.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, {
|
return makeResponse(200, {
|
||||||
base_resp: { status_code: 0, status_msg: "ok" },
|
base_resp: { status_code: 0, status_msg: "ok" },
|
||||||
data: {
|
data: {
|
||||||
@@ -220,7 +220,7 @@ describe("provider usage loading", () => {
|
|||||||
const mockFetch = vi.fn<Parameters<typeof fetch>, ReturnType<typeof fetch>>(async (input) => {
|
const mockFetch = vi.fn<Parameters<typeof fetch>, ReturnType<typeof fetch>>(async (input) => {
|
||||||
const url =
|
const url =
|
||||||
typeof input === "string" ? input : input instanceof URL ? input.toString() : input.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, {
|
return makeResponse(200, {
|
||||||
base_resp: { status_code: 0, status_msg: "ok" },
|
base_resp: { status_code: 0, status_msg: "ok" },
|
||||||
model_remains: [
|
model_remains: [
|
||||||
|
|||||||
Reference in New Issue
Block a user