diff --git a/packages/catalog/CHANGELOG.md b/packages/catalog/CHANGELOG.md index c17a31090..874fcc743 100644 --- a/packages/catalog/CHANGELOG.md +++ b/packages/catalog/CHANGELOG.md @@ -2,6 +2,10 @@ ## [Unreleased] +### Fixed + +- Fixed MiniMax-M3 catalog context for the MiniMax Coding/Token Plan providers `minimax-code` and `minimax-code-cn` to report the documented 1M long-context tier instead of the upstream 512K pricing boundary; the previous patch only covered `minimax`/`minimax-cn`, so the Coding Plan picker still showed 512K in the status bar ([#3097](https://github.com/can1357/oh-my-pi/issues/3097)). + ## [16.1.4] - 2026-06-19 ### Fixed diff --git a/packages/catalog/scripts/generated-policies.ts b/packages/catalog/scripts/generated-policies.ts index 52122b8b6..8eee956ff 100644 --- a/packages/catalog/scripts/generated-policies.ts +++ b/packages/catalog/scripts/generated-policies.ts @@ -219,8 +219,17 @@ function applyGeneratedModelPolicy(model: ModelSpec): void { model.maxTokens = 131_072; } // MiniMax-M3: 512K is the standard pricing tier boundary, not the - // model ceiling. Pin the long-context providers to the documented 1M tier. - if ((model.provider === "minimax" || model.provider === "minimax-cn") && model.id === "MiniMax-M3") { + // model ceiling. Pin every long-context provider that serves the model + // (anthropic-messages `minimax`/`minimax-cn` and the openai-completions + // MiniMax Coding/Token Plan endpoints `minimax-code`/`minimax-code-cn`) + // to the documented 1M tier. + if ( + model.id === "MiniMax-M3" && + (model.provider === "minimax" || + model.provider === "minimax-cn" || + model.provider === "minimax-code" || + model.provider === "minimax-code-cn") + ) { model.contextWindow = 1_000_000; } diff --git a/packages/catalog/src/models.json b/packages/catalog/src/models.json index 92e495a04..ff85042c7 100644 --- a/packages/catalog/src/models.json +++ b/packages/catalog/src/models.json @@ -32139,7 +32139,7 @@ "cacheRead": 0, "cacheWrite": 0 }, - "contextWindow": 512000, + "contextWindow": 1000000, "maxTokens": 128000, "compat": { "supportsStore": false, @@ -32448,7 +32448,7 @@ "cacheRead": 0, "cacheWrite": 0 }, - "contextWindow": 512000, + "contextWindow": 1000000, "maxTokens": 128000, "compat": { "supportsStore": false, diff --git a/packages/catalog/test/generated-policies.test.ts b/packages/catalog/test/generated-policies.test.ts index 3db875175..46f738346 100644 --- a/packages/catalog/test/generated-policies.test.ts +++ b/packages/catalog/test/generated-policies.test.ts @@ -149,6 +149,13 @@ describe("generated model policies", () => { contextWindow: 512_000, maxTokens: 128_000, }), + createSpec({ + id: "MiniMax-M3", + api: "openai-completions", + provider: "minimax-code-cn", + contextWindow: 512_000, + maxTokens: 128_000, + }), ]; applyGeneratedModelPolicies(models); @@ -157,8 +164,10 @@ describe("generated model policies", () => { expect(models[0]?.maxTokens).toBe(128_000); expect(models[1]?.contextWindow).toBe(1_000_000); expect(models[1]?.maxTokens).toBe(128_000); - expect(models[2]?.contextWindow).toBe(512_000); + expect(models[2]?.contextWindow).toBe(1_000_000); expect(models[2]?.maxTokens).toBe(128_000); + expect(models[3]?.contextWindow).toBe(1_000_000); + expect(models[3]?.maxTokens).toBe(128_000); }); it("normalizes Copilot generated fallback limits", () => { diff --git a/packages/catalog/test/minimax-bundled-catalog.test.ts b/packages/catalog/test/minimax-bundled-catalog.test.ts index ca2244daf..c55140867 100644 --- a/packages/catalog/test/minimax-bundled-catalog.test.ts +++ b/packages/catalog/test/minimax-bundled-catalog.test.ts @@ -6,6 +6,8 @@ describe("minimax bundled catalog", () => { const providers = [ { id: "minimax", models: modelsJson.minimax }, { id: "minimax-cn", models: modelsJson["minimax-cn"] }, + { id: "minimax-code", models: modelsJson["minimax-code"] }, + { id: "minimax-code-cn", models: modelsJson["minimax-code-cn"] }, ]; for (const provider of providers) {