import { type ReasoningEffort } from "../shared/reasoning-effort.js"; /** * First-party hosted A/B: the Builder default (`engine.defaultModel` at * DEFAULT_REASONING_EFFORT) versus Haiku 5.5 at medium effort. Chat clients * send the default model and effort explicitly, so this keys off the resolved * values rather than the explicit-request flag the DB experiment path uses. * Any other model or effort is a deliberate choice and is left alone. */ export declare const HOSTED_MODEL_EXPERIMENT_ID = "hosted-default-haiku-5-5-medium-vs-luna-high-2026-10"; export declare const HOSTED_MODEL_EXPERIMENT_CONTROL: { readonly id: "luna-high"; }; export declare const HOSTED_MODEL_EXPERIMENT_TREATMENT: { readonly id: "haiku-5-5-medium"; readonly model: "claude-haiku-5-5"; readonly effort: "medium"; }; export interface HostedModelExperimentAssignment { experimentId: string; variantId: string; } export interface HostedModelExperimentResolution { /** True only for the Haiku arm; control keeps the request's model and effort. */ treatment: boolean; model: string; /** Undefined for the control arm: the request's own effort stands. */ effort?: ReasoningEffort; assignment: HostedModelExperimentAssignment; } /** * `setting` is `observability.hostedModelExperiment` from app config. `auto` * follows the caller's first-party hosted check; `on` forces it for preview; * `off` is the emergency rollback. */ export declare function isHostedModelExperimentEnabled(args: { setting: "auto" | "on" | "off"; firstParty: boolean; }): boolean; /** * Stable across apps and processes: the same user lands in the same arm in * every hosted template for the life of this experiment id. No DB write needed. */ export declare function hostedModelExperimentBucket(userEmail: string): number; export declare function resolveHostedModelExperiment(args: { enabled: boolean; userEmail: string | null | undefined; engineName: string; defaultModel: string; model: string; /** The request's effort as submitted; anything but default means a choice. */ effort: unknown; }): HostedModelExperimentResolution | null; /** * The hosted arm's variant, found by id so it is reported even when the turn * is also in another experiment. The singular experiment tags only cover a * turn with exactly one assignment. */ export declare function hostedModelExperimentVariant(assignments: readonly HostedModelExperimentAssignment[] | undefined): string | undefined; /** * The singular experiment tags predate the hosted test. They keep naming only * the other experiment on a turn, so the hosted arm never changes them. */ export declare function singleNonHostedAssignment(assignments: readonly HostedModelExperimentAssignment[] | undefined, selectedAssignment?: HostedModelExperimentAssignment): HostedModelExperimentAssignment | undefined;