import type { Model, ServiceTier, ServiceTierByFamily, ServiceTierFamily } from "@oh-my-pi/pi-ai"; import type { SubmenuOption } from "@oh-my-pi/pi-tui/overlays/settings-defs"; /** * Per-family service-tier setting values. `"none"` is the omit-the-parameter * sentinel; the rest mirror the wire {@link ServiceTier} values each provider * family actually realizes. OpenAI accepts the full set; Anthropic realizes * only `priority` (fast mode); Google (Gemini API + Vertex) realizes * `flex`/`priority`. */ export declare const SERVICE_TIER_OPENAI_VALUES: readonly ["none", "auto", "default", "flex", "scale", "priority", "ultrafast"]; export declare const SERVICE_TIER_ANTHROPIC_VALUES: readonly ["none", "priority"]; export declare const SERVICE_TIER_GOOGLE_VALUES: readonly ["none", "flex", "priority"]; export type ServiceTierOpenAISettingValue = (typeof SERVICE_TIER_OPENAI_VALUES)[number]; export type ServiceTierAnthropicSettingValue = (typeof SERVICE_TIER_ANTHROPIC_VALUES)[number]; export type ServiceTierGoogleSettingValue = (typeof SERVICE_TIER_GOOGLE_VALUES)[number]; /** Whether a runtime value is a supported OpenAI service-tier setting. */ export declare function isServiceTierOpenAISettingValue(value: string): value is ServiceTierOpenAISettingValue; /** Whether a runtime value names a provider family with an independent service-tier knob. */ export declare function isServiceTierFamily(value: unknown): value is ServiceTierFamily; /** Whether a runtime value is a supported service tier for one provider family. */ export declare function isServiceTierForFamily(family: string, tier: unknown): tier is ServiceTier; /** * Inherit-capable single value for the subagent/advisor tiers. The chosen tier * is broadcast across families and applied to whichever family the spawned * model belongs to (clamped to what that family realizes); `"inherit"` defers * to the main agent's live per-family selection. */ export declare const SERVICE_TIER_INHERIT_SETTING_VALUES: readonly ["inherit", "none", "auto", "default", "flex", "scale", "priority", "ultrafast"]; export type ServiceTierInheritSettingValue = (typeof SERVICE_TIER_INHERIT_SETTING_VALUES)[number]; /** Whether a runtime value is valid for an inherit-capable service-tier setting. */ export declare function isServiceTierInheritSettingValue(value: unknown): value is ServiceTierInheritSettingValue; /** * Validate the sparse exact-agent-name tier map used by task dispatch. An absent * or empty (`null`) mapping means no overrides; any other non-mapping container is * a config typo that would otherwise silently disable every override. */ export declare function validateAgentServiceTierOverrides(value: unknown): Record; export declare const SERVICE_TIER_OPENAI_OPTIONS: ReadonlyArray>; export declare const SERVICE_TIER_ANTHROPIC_OPTIONS: ReadonlyArray>; export declare const SERVICE_TIER_GOOGLE_OPTIONS: ReadonlyArray>; export declare const SERVICE_TIER_INHERIT_OPTIONS: ReadonlyArray>; /** Map a per-family setting value to a wire {@link ServiceTier}, or `undefined` to omit. */ export declare function serviceTierSettingToTier(value: string): ServiceTier | undefined; /** Assemble the live per-family tier map from the three `tier.*` setting values. */ export declare function buildServiceTierByFamily(openai: string, anthropic: string, google: string): ServiceTierByFamily; /** * Broadcast a single chosen tier across families, clamped to what each family * realizes: OpenAI takes any tier, Anthropic only `priority`, Google only * `flex`/`priority`. Used by the subagent/advisor single-value settings and the * `omp bench --service-tier` flag, which apply one tier to whatever family the * target model belongs to. */ export declare function serviceTierForAllFamilies(tier: ServiceTier | undefined): ServiceTierByFamily; /** * Resolve a subagent/advisor service-tier setting to a per-family map. * * - A concrete tier is broadcast across families (see * {@link serviceTierForAllFamilies}). * - `"none"` yields an empty map. * - `"inherit"` defers to `inherited` — the parent's live per-family tiers when * a live session supplied them, else the empty map. */ export declare function resolveSubagentServiceTier(setting: string, inherited: ServiceTierByFamily): ServiceTierByFamily; /** * Resolve one exact-agent override against the model the child session settled * on. Concrete tiers populate only that model's provider family, so the session's * retry chain keeps the tier on same-family fallbacks and never carries it across * families. Without a resolved model there is no family to scope to, so a * concrete tier yields no entry rather than a cross-family broadcast. */ export declare function resolveAgentServiceTierOverride(setting: ServiceTierInheritSettingValue, model: Model | undefined, inherited: ServiceTierByFamily): ServiceTierByFamily;