zaiStartPlanModelIds.test.ts 756 B

123456789101112131415161718192021
  1. import { describe, expect, it } from "vitest";
  2. import { resolveZaiStartPlanBalanceModelIds } from "../src/model-provider/zaiStartPlanBilling.js";
  3. describe("Start 官方成员名单", () => {
  4. it("规范化再去重,未知型号和服务端能力范围保持不变", () => {
  5. expect(
  6. resolveZaiStartPlanBalanceModelIds({
  7. data: {
  8. balances: [
  9. {
  10. capabilities: ["model:glm-5.3-FLASH", "MODEL:GLM-5.3-Flash", "model:future-glm"],
  11. show_name: "不应加入",
  12. },
  13. { show_name: "glm-4.7-flashx" },
  14. ],
  15. },
  16. }),
  17. ).toEqual(["GLM-5.3-Flash", "future-glm", "GLM-4.7-FlashX"]);
  18. expect(resolveZaiStartPlanBalanceModelIds({})).toEqual([]);
  19. });
  20. });