import { i as NodmixConfig } from "./types.nodmix-B9QJSty6.js";
import { o as AgentModelConfig } from "./types.provider-request-DemV03vt.js";
import { t as FallbackAttempt } from "./model-fallback.types-BLDHZH6C.js";
import { n as getProviderEnvVars } from "./provider-env-vars-BapseKw5.js";
import { t as MediaGenerationNormalizationMetadataInput } from "./normalization-SN9dmAae.js";

//#region src/media-generation/runtime-shared.d.ts
type ParsedProviderModelRef = {
  provider: string;
  model: string;
};
declare function recordCapabilityCandidateFailure(params: {
  attempts: FallbackAttempt[];
  provider: string;
  model: string;
  error: unknown;
}): void;
declare function resolveMediaProviderDefaultTimeoutMs(timeoutMs: number | undefined): number | undefined;
declare function resolveMediaProviderRequestTimeoutMs(params: {
  timeoutMs?: number;
  providerDefaultTimeoutMs?: number;
}): number | undefined;
type CapabilityProviderCandidate = {
  id: string;
  aliases?: readonly string[];
  defaultModel?: string | null;
  models?: readonly string[];
  isConfigured?: (ctx: {
    cfg?: NodmixConfig;
    agentDir?: string;
  }) => boolean;
};
declare function resolveCapabilityModelCandidates(params: {
  cfg: NodmixConfig;
  modelConfig: AgentModelConfig | undefined;
  modelOverride?: string;
  parseModelRef: (raw: string | undefined) => ParsedProviderModelRef | null;
  agentDir?: string;
  listProviders?: (cfg?: NodmixConfig) => CapabilityProviderCandidate[];
  autoProviderFallback?: boolean;
}): ParsedProviderModelRef[];
declare function deriveAspectRatioFromSize(size?: string): string | undefined;
declare function resolveClosestAspectRatio(params: {
  requestedAspectRatio?: string;
  requestedSize?: string;
  supportedAspectRatios?: readonly string[];
}): string | undefined;
declare function resolveClosestSize(params: {
  requestedSize?: string;
  requestedAspectRatio?: string;
  supportedSizes?: readonly string[];
}): string | undefined;
declare function resolveClosestResolution<TResolution extends string>(params: {
  requestedResolution?: TResolution;
  supportedResolutions?: readonly TResolution[];
  order?: readonly TResolution[];
}): TResolution | undefined;
declare function normalizeDurationToClosestMax(durationSeconds?: number, maxDurationSeconds?: number): number | undefined;
declare function buildMediaGenerationNormalizationMetadata(params: {
  normalization?: MediaGenerationNormalizationMetadataInput;
  requestedSizeForDerivedAspectRatio?: string;
  includeSupportedDurationSeconds?: boolean;
}): Record<string, unknown>;
declare function throwCapabilityGenerationFailure(params: {
  capabilityLabel: string;
  attempts: FallbackAttempt[];
  lastError: unknown;
}): never;
declare function buildNoCapabilityModelConfiguredMessage(params: {
  capabilityLabel: string;
  modelConfigKey: string;
  providers: Array<{
    id: string;
    defaultModel?: string | null;
  }>;
  fallbackSampleRef?: string;
  getProviderEnvVars?: typeof getProviderEnvVars;
}): string;
//#endregion
export { normalizeDurationToClosestMax as a, resolveClosestAspectRatio as c, resolveMediaProviderDefaultTimeoutMs as d, resolveMediaProviderRequestTimeoutMs as f, deriveAspectRatioFromSize as i, resolveClosestResolution as l, buildMediaGenerationNormalizationMetadata as n, recordCapabilityCandidateFailure as o, throwCapabilityGenerationFailure as p, buildNoCapabilityModelConfiguredMessage as r, resolveCapabilityModelCandidates as s, ParsedProviderModelRef as t, resolveClosestSize as u };