fix(ai): refresh Xiaomi token plan model catalogs

Use the new provider-specific Xiaomi Token Plan catalogs from models.dev instead of cloning the API-billing Xiaomi catalog into every token-plan region. This removes API-billing-only models such as mimo-v2-omni from xiaomi-token-plan-{cn,ams,sgp}.
This commit is contained in:
Vegard Stikbakke
2026-07-08 09:39:44 +02:00
parent 4ea062f9f3
commit cc2db98002
14 changed files with 270 additions and 353 deletions
+6 -4
View File
@@ -2,14 +2,16 @@ import { describe, expect, it } from "vitest";
import { getModel, getModels } from "../src/compat.ts";
describe("Xiaomi MiMo models", () => {
it("keeps mimo-v2-flash on the API billing provider", () => {
expect(getModel("xiaomi", "mimo-v2-flash")).toBeDefined();
it.each(["mimo-v2-flash", "mimo-v2-omni"] as const)("keeps %s on the API billing provider", (modelId) => {
expect(getModel("xiaomi", modelId)).toBeDefined();
});
it.each(["xiaomi-token-plan-cn", "xiaomi-token-plan-ams", "xiaomi-token-plan-sgp"] as const)(
"omits mimo-v2-flash from %s",
"omits API-billing-only models from %s",
(provider) => {
expect(getModels(provider).some((model) => model.id === "mimo-v2-flash")).toBe(false);
const modelIds = getModels(provider).map((model) => model.id);
expect(modelIds).not.toContain("mimo-v2-flash");
expect(modelIds).not.toContain("mimo-v2-omni");
},
);
});