diff --git a/src/agents/minimax-docs.test.ts b/src/agents/minimax-docs.test.ts deleted file mode 100644 index e8b833e227f9..000000000000 --- a/src/agents/minimax-docs.test.ts +++ /dev/null @@ -1,30 +0,0 @@ -// MiniMax docs sync tests keep provider docs and live-test guidance aligned -// with the shared MiniMax model constants. -import fs from "node:fs"; -import path from "node:path"; -import { describe, expect, it } from "vitest"; -import { - MINIMAX_DEFAULT_MODEL_ID, - MINIMAX_DEFAULT_MODEL_REF, - MINIMAX_TEXT_MODEL_REFS, -} from "../plugin-sdk/minimax.js"; - -const repoRoot = path.resolve(import.meta.dirname, "../.."); -const testingLiveDoc = fs.readFileSync(path.join(repoRoot, "docs/help/testing-live.md"), "utf8"); -const minimaxDoc = fs.readFileSync(path.join(repoRoot, "docs/providers/minimax.md"), "utf8"); - -describe("MiniMax docs sync", () => { - it("keeps the live-testing guide on the current MiniMax default", () => { - expect(testingLiveDoc).toContain(MINIMAX_DEFAULT_MODEL_REF); - }); - - it("keeps the provider doc aligned with shared MiniMax ids", () => { - expect(minimaxDoc).toContain(MINIMAX_DEFAULT_MODEL_ID); - expect(minimaxDoc).toContain(MINIMAX_DEFAULT_MODEL_REF); - expect(minimaxDoc).toContain(`Unknown model: ${MINIMAX_DEFAULT_MODEL_REF}`); - for (const modelRef of MINIMAX_TEXT_MODEL_REFS.slice(3)) { - expect(minimaxDoc).toContain(modelRef); - } - expect(minimaxDoc).not.toContain("(unreleased at the time of writing)"); - }); -}); diff --git a/src/agents/models-config.providers.minimax.test.ts b/src/agents/models-config.providers.minimax.test.ts deleted file mode 100644 index aaeb1d0c3646..000000000000 --- a/src/agents/models-config.providers.minimax.test.ts +++ /dev/null @@ -1,74 +0,0 @@ -// Mirrors the implicit API-key and OAuth MiniMax catalogs that must stay in lockstep. -import { describe, expect, it } from "vitest"; - -function buildMinimaxCatalog() { - return [ - { - id: "MiniMax-M3", - cost: { - input: 0.6, - output: 2.4, - cacheRead: 0.12, - cacheWrite: 0, - }, - }, - { - id: "MiniMax-M2.7", - cost: { - input: 1.1, - output: 4.4, - cacheRead: 0.11, - cacheWrite: 0.6875, - }, - }, - { - id: "MiniMax-M2.7-highspeed", - cost: { - input: 0.6, - output: 2.4, - cacheRead: 0.06, - cacheWrite: 0.375, - }, - }, - ]; -} - -describe("minimax provider catalog", () => { - it("does not advertise the removed lightning model for api-key or oauth providers", () => { - const providers = { - minimax: { models: buildMinimaxCatalog() }, - "minimax-portal": { models: buildMinimaxCatalog() }, - }; - expect(providers?.minimax?.models?.map((model) => model.id)).toEqual([ - "MiniMax-M3", - "MiniMax-M2.7", - "MiniMax-M2.7-highspeed", - ]); - expect(providers?.["minimax-portal"]?.models?.map((model) => model.id)).toEqual([ - "MiniMax-M3", - "MiniMax-M2.7", - "MiniMax-M2.7-highspeed", - ]); - }); - - it("keeps MiniMax highspeed pricing distinct in implicit catalogs", () => { - const providers = { - minimax: { models: buildMinimaxCatalog() }, - "minimax-portal": { models: buildMinimaxCatalog() }, - }; - const apiHighspeed = providers?.minimax?.models?.find( - (model) => model.id === "MiniMax-M2.7-highspeed", - ); - const portalHighspeed = providers?.["minimax-portal"]?.models?.find( - (model) => model.id === "MiniMax-M2.7-highspeed", - ); - - expect(apiHighspeed?.cost).toEqual({ - input: 0.6, - output: 2.4, - cacheRead: 0.06, - cacheWrite: 0.375, - }); - expect(portalHighspeed?.cost).toEqual(apiHighspeed?.cost); - }); -}); diff --git a/src/plugin-sdk/minimax.ts b/src/plugin-sdk/minimax.ts deleted file mode 100644 index 62ac07169313..000000000000 --- a/src/plugin-sdk/minimax.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Manual facade. Keep loader boundary explicit. -type FacadeModule = { - MINIMAX_DEFAULT_MODEL_ID: string; - MINIMAX_DEFAULT_MODEL_REF: string; - MINIMAX_TEXT_MODEL_REFS: readonly string[]; -}; -import { - createLazyFacadeArrayValue, - loadBundledPluginPublicSurfaceModuleSync, -} from "./facade-loader.js"; - -function loadFacadeModule(): FacadeModule { - return loadBundledPluginPublicSurfaceModuleSync({ - dirName: "minimax", - artifactBasename: "api.js", - }); -} - -/** Default MiniMax text model id exposed by the bundled provider facade. */ -export const MINIMAX_DEFAULT_MODEL_ID: FacadeModule["MINIMAX_DEFAULT_MODEL_ID"] = - loadFacadeModule().MINIMAX_DEFAULT_MODEL_ID; -/** Default MiniMax provider/model reference used by config helpers. */ -export const MINIMAX_DEFAULT_MODEL_REF: FacadeModule["MINIMAX_DEFAULT_MODEL_REF"] = - loadFacadeModule().MINIMAX_DEFAULT_MODEL_REF; -/** MiniMax text model references advertised by the bundled provider facade. */ -export const MINIMAX_TEXT_MODEL_REFS: FacadeModule["MINIMAX_TEXT_MODEL_REFS"] = - createLazyFacadeArrayValue( - () => loadFacadeModule().MINIMAX_TEXT_MODEL_REFS as unknown as readonly unknown[], - ) as FacadeModule["MINIMAX_TEXT_MODEL_REFS"];