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.
16 lines
552 B
TypeScript
16 lines
552 B
TypeScript
import type { ModelSelection } from "@t3tools/contracts";
|
|
import {
|
|
getModelSelectionBooleanOptionValue,
|
|
getModelSelectionStringOptionValue,
|
|
} from "@t3tools/shared/model";
|
|
|
|
export function getCodexServiceTierOptionValue(
|
|
modelSelection: ModelSelection | null | undefined,
|
|
): string | undefined {
|
|
const tier =
|
|
getModelSelectionStringOptionValue(modelSelection, "serviceTier") ??
|
|
(getModelSelectionBooleanOptionValue(modelSelection, "fastMode") === true ? "fast" : undefined);
|
|
if (tier === "default") return undefined;
|
|
return tier;
|
|
}
|