/** All valid server modes, for iteration in tests and caches. */

!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="bad15fde-0076-5976-8e6c-17fca7ab4006")}catch(e){}}();
export const SERVER_MODES = ['default', 'openai'];
/** Set of valid UiMode values for O(1) membership checks at runtime. */
const UI_MODES = new Set(SERVER_MODES.filter((m) => m !== 'default'));
/**
 * Parse an untrusted string into a valid UiMode, returning `undefined` for invalid values.
 * Use at ingestion boundaries (URL params, env vars) to prevent invalid modes from propagating.
 */
export function parseUiMode(value) {
    if (!value)
        return undefined;
    if (value === 'true')
        return 'openai'; // 'true' is the new standard; 'openai' is deprecated alias
    return UI_MODES.has(value) ? value : undefined;
}
//# sourceMappingURL=types.js.map
//# debugId=bad15fde-0076-5976-8e6c-17fca7ab4006
