Squashed 'src/pi/' content from commit d981de122
git-subtree-dir: src/pi git-subtree-split: d981de1229ef899957bbe968bc8dcda02a21f477
This commit is contained in:
18
packages/ai/test/xiaomi-models.test.ts
Normal file
18
packages/ai/test/xiaomi-models.test.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { getModels } from "../src/compat.ts";
|
||||
|
||||
const XIAOMI_PROVIDERS = ["xiaomi", "xiaomi-token-plan-cn", "xiaomi-token-plan-ams", "xiaomi-token-plan-sgp"] as const;
|
||||
const DEPRECATED_MODEL_IDS = ["mimo-v2-flash", "mimo-v2-omni", "mimo-v2-pro"] as const;
|
||||
const REPLACEMENT_MODEL_IDS = ["mimo-v2.5", "mimo-v2.5-pro"] as const;
|
||||
|
||||
describe("Xiaomi MiMo models", () => {
|
||||
it.each(XIAOMI_PROVIDERS)("omits deprecated models from %s", (provider) => {
|
||||
const modelIds = getModels(provider).map((model) => model.id);
|
||||
for (const modelId of DEPRECATED_MODEL_IDS) expect(modelIds).not.toContain(modelId);
|
||||
});
|
||||
|
||||
it.each(XIAOMI_PROVIDERS)("keeps replacement models on %s", (provider) => {
|
||||
const modelIds = getModels(provider).map((model) => model.id);
|
||||
for (const modelId of REPLACEMENT_MODEL_IDS) expect(modelIds).toContain(modelId);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user