tui-chat-depth.test.ts 802 B

123456789101112131415161718192021222324252627
  1. import { describe, expect, it } from "vitest";
  2. import { resolveChatDepthProfile } from "../tui/chat-depth.js";
  3. describe("tui chat depth", () => {
  4. it("maps light/normal/deep to stable chat options", () => {
  5. expect(resolveChatDepthProfile("light")).toEqual({
  6. depth: "light",
  7. temperature: 0.3,
  8. maxTokens: 160,
  9. label: "light",
  10. });
  11. const normal = resolveChatDepthProfile("normal");
  12. expect(normal).toEqual({
  13. depth: "normal",
  14. temperature: 0.4,
  15. label: "normal",
  16. });
  17. // normal depth must NOT include maxTokens — let the model decide
  18. expect(normal.maxTokens).toBeUndefined();
  19. expect(resolveChatDepthProfile("deep")).toEqual({
  20. depth: "deep",
  21. temperature: 0.45,
  22. maxTokens: 420,
  23. label: "deep",
  24. });
  25. });
  26. });