Skip to content

The open-source full-stack studio for Opus 5.5 motion video. Reverse engineering for any video. Code video with HTML: recreate, edit and render. BYOA + BYOK · Motion.md · Images, Video, Music & Voice.

fix(claude): add MiniMax models to the picker (#129)

Octopus553ed98c283f
diff --git a/cli/src/__tests__/agents-detect.test.ts b/cli/src/__tests__/agents-detect.test.ts
index 2ee6d659..5136038d 100644
--- a/cli/src/__tests__/agents-detect.test.ts
+++ b/cli/src/__tests__/agents-detect.test.ts
@@ -270,6 +270,20 @@ describe("detectAgents", () => {
});
describe("returned agent shape", () => {
+ it("includes the configured MiniMax Claude-compatible models in the Claude picker", () => {
+ existsSyncMock.mockReturnValue(false);
+
+ const agents = detectAgents();
+ const claude = findAgent(agents, "claude");
+
+ expect(claude.models).toEqual(
+ expect.arrayContaining([
+ { id: "MiniMax-M3", label: "MiniMax-M3" },
+ { id: "MiniMax-M2.7", label: "MiniMax-M2.7" },
+ ]),
+ );
+ });
+
it("returns all agents from AGENTS array", () => {
existsSyncMock.mockReturnValue(false);
diff --git a/cli/src/agents-detect.ts b/cli/src/agents-detect.ts
index b86b0fd8..f4813b43 100644
--- a/cli/src/agents-detect.ts
+++ b/cli/src/agents-detect.ts
@@ -39,6 +39,8 @@ export const AGENTS: AgentDef[] = [
{ id: "claude-opus-4-7", label: "claude-opus-4-7" },
{ id: "claude-sonnet-4-6", label: "claude-sonnet-4-6" },
{ id: "claude-haiku-4-5", label: "claude-haiku-4-5" },
+ { id: "MiniMax-M3", label: "MiniMax-M3" },
+ { id: "MiniMax-M2.7", label: "MiniMax-M2.7" },
],
},
{
@@ -386,4 +388,4 @@ export function detectAgents(): DetectedAgent[] {
}
return { ...base, available: false };
});
-}
\ No newline at end of file
+}
diff --git a/next/src/lib/agents/__tests__/detect.test.ts b/next/src/lib/agents/__tests__/detect.test.ts
new file mode 100644
index 00000000..7911d272
--- /dev/null
+++ b/next/src/lib/agents/__tests__/detect.test.ts
@@ -0,0 +1,44 @@
+import { describe, expect, it, vi, beforeEach, afterEach } from "vitest";
+
+const { existsSyncMock } = vi.hoisted(() => ({
+ existsSyncMock: vi.fn((_path?: string) => false),
+}));
+
+vi.mock("node:fs", async () => {
+ const actual = await vi.importActual<typeof import("node:fs")>("node:fs");
+ return { ...actual, existsSync: existsSyncMock };
+});
+
+import { detectAgents } from "../detect";
+
+function findAgent(
+ agents: ReturnType<typeof detectAgents>,
+ id: string,
+) {
+ const agent = agents.find((a) => a.id === id);
+ if (!agent) throw new Error(`Agent with id "${id}" not found`);
+ return agent;
+}
+
+beforeEach(() => {
+ existsSyncMock.mockReset();
+ existsSyncMock.mockReturnValue(false);
+});
+
+afterEach(() => {
+ vi.unstubAllEnvs();
+});
+
+describe("detectAgents", () => {
+ it("includes the configured MiniMax Claude-compatible models in the Claude picker", () => {
+ const agents = detectAgents();
+ const claude = findAgent(agents, "claude");
+
+ expect(claude.models).toEqual(
+ expect.arrayContaining([
+ { id: "MiniMax-M3", label: "MiniMax-M3" },
+ { id: "MiniMax-M2.7", label: "MiniMax-M2.7" },
+ ]),
+ );
+ });
+});
diff --git a/next/src/lib/agents/detect.ts b/next/src/lib/agents/detect.ts
index 215868f5..f98123e5 100644
--- a/next/src/lib/agents/detect.ts
+++ b/next/src/lib/agents/detect.ts
@@ -60,6 +60,8 @@ export const AGENTS: AgentDef[] = [
{ id: "claude-opus-4-7", label: "claude-opus-4-7" },
{ id: "claude-sonnet-4-6", label: "claude-sonnet-4-6" },
{ id: "claude-haiku-4-5", label: "claude-haiku-4-5" },
+ { id: "MiniMax-M3", label: "MiniMax-M3" },
+ { id: "MiniMax-M2.7", label: "MiniMax-M2.7" },
],
},
{