Skip to content

Commit 37b862e

Browse files
committed
fix(web): recognize the Codex priority tier as fast
1 parent eda485f commit 37b862e

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎apps/web/src/components/chat/TraitsPicker.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ describe("buildTraitsTriggerDisplay", () => {
6464
"serviceTier",
6565
[
6666
{ id: "default", label: "Standard", isDefault: true },
67-
{ id: "fast", label: "Fast" },
67+
{ id: "priority", label: "Fast" },
6868
],
6969
"default",
7070
);
@@ -73,7 +73,7 @@ describe("buildTraitsTriggerDisplay", () => {
7373
label: "High",
7474
showFastModeIcon: false,
7575
});
76-
expect(display([EFFORT, { ...serviceTier, currentValue: "fast" }])).toEqual({
76+
expect(display([EFFORT, { ...serviceTier, currentValue: "priority" }])).toEqual({
7777
label: "High",
7878
showFastModeIcon: true,
7979
});

‎apps/web/src/components/chat/TraitsPicker.tsx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -402,13 +402,13 @@ export function buildTraitsTriggerDisplay(input: {
402402
if (
403403
input.provider === "codex" &&
404404
descriptor.id === "serviceTier" &&
405-
descriptor.type === "select" &&
406-
descriptor.options.some(({ id }) => id === "fast")
405+
descriptor.type === "select"
407406
) {
408407
const currentValue = getProviderOptionCurrentValue(descriptor);
409-
if (currentValue === "default" || currentValue === "fast") {
408+
const fastTier = descriptor.options.find(({ label }) => label === "Fast");
409+
if (fastTier && (currentValue === "default" || currentValue === fastTier.id)) {
410410
hasFastMode = true;
411-
fastModeEnabled = currentValue === "fast";
411+
fastModeEnabled = currentValue === fastTier.id;
412412
continue;
413413
}
414414
}

0 commit comments

Comments
 (0)