model-selection.test.ts 761 B

12345678910111213141516171819202122232425262728
  1. import { describe, expect, it } from "vitest";
  2. import { parseModelSelectionValue } from "../src/model/index.js";
  3. describe("model selection", () => {
  4. it("reads the structured persisted selection", () => {
  5. expect(
  6. parseModelSelectionValue({
  7. providerId: "provider-a",
  8. modelId: "model-a",
  9. options: { reasoningLevel: "high" },
  10. }),
  11. ).toEqual({
  12. providerId: "provider-a",
  13. modelId: "model-a",
  14. options: { reasoningLevel: "high" },
  15. });
  16. });
  17. it("does not interpret legacy storage fields in the domain contract", () => {
  18. expect(
  19. parseModelSelectionValue({
  20. providerId: "provider-a",
  21. modelId: "model-a",
  22. thoughtLevel: "high",
  23. }),
  24. ).toBeUndefined();
  25. });
  26. });