History

fix: filter synthetic 'default' service tier and close registry sync probe race

Bug 1: getCodexServiceTierOptionValue now returns undefined when the persisted serviceTier value is the synthetic 'default' id used only as a UI select option. Previously this forwarded 'default' to the API, which overrides project-level routing settings. Standard routing should omit the tier entirely (matching pre-change behavior). Bug 2: Add a deferred re-read of instance snapshots after the forked stream consumers have had time to subscribe. The managed provider updates its snapshot ref before publishing to its PubSub, so re-reading after a yield captures any probe result that landed between the initial getSnapshot and the subscriber becoming active.

Cursor Agent committed 5 months ago

Commit cb4e8f41 parent 34629c22 files · +24 −3Browse files

Showing the changes to apps/server/src/codexModelOptions.ts (1 of 2 files). Show all

Unified · Split

apps/server/src/codexModelOptions.ts+4−3
@@ -7,8 +7,9 @@ import { · 6 unmodified lines
7export function getCodexServiceTierOptionValue(7export function getCodexServiceTierOptionValue(
8 modelSelection: ModelSelection | null | undefined,8 modelSelection: ModelSelection | null | undefined,
9): string | undefined {9): string | undefined {
10 return (10 const tier =
11 getModelSelectionStringOptionValue(modelSelection, "serviceTier") ??11 getModelSelectionStringOptionValue(modelSelection, "serviceTier") ??
12 (getModelSelectionBooleanOptionValue(modelSelection, "fastMode") === true ? "fast" : undefined)12 (getModelSelectionBooleanOptionValue(modelSelection, "fastMode") === true ? "fast" : undefined);
13 );13 if (tier === "default") return undefined;
14 return tier;
14}15}