| 1 | import { assert, it } from "@effect/vitest"; |
| 2 | |
| 3 | import { ProviderInstanceId } from "@t3tools/contracts"; |
| 4 | import { createModelSelection } from "@t3tools/shared/model"; |
| 5 | |
| 6 | import { getCodexServiceTierOptionValue } from "./codexModelOptions.ts"; |
| 7 | |
| 8 | it("returns the selected Codex service tier id", () => { |
| 9 | const selection = createModelSelection(ProviderInstanceId.make("codex"), "gpt-5.5", [ |
| 10 | { id: "serviceTier", value: "flex" }, |
| 11 | ]); |
| 12 | |
| 13 | assert.equal(getCodexServiceTierOptionValue(selection), "flex"); |
| 14 | }); |
| 15 | |
| 16 | it("keeps legacy persisted fast mode selections working", () => { |
| 17 | const selection = createModelSelection(ProviderInstanceId.make("codex"), "gpt-5.4", [ |
| 18 | { id: "fastMode", value: true }, |
| 19 | ]); |
| 20 | |
| 21 | assert.equal(getCodexServiceTierOptionValue(selection), "fast"); |
| 22 | }); |