import * as z from "zod/v4"; import { OpenEnum } from "../types/enums.js"; import { PreferredMaxLatency, PreferredMaxLatency$Outbound } from "./preferredmaxlatency.js"; import { PreferredMinThroughput, PreferredMinThroughput$Outbound } from "./preferredminthroughput.js"; import { ProviderName } from "./providername.js"; import { ProviderSort } from "./providersort.js"; import { ProviderSortConfig, ProviderSortConfig$Outbound } from "./providersortconfig.js"; import { Quantization } from "./quantization.js"; /** * Data collection setting. If no available model provider meets the requirement, your request will return an error. * * @remarks * - allow: (default) allow providers which store user data non-transiently and may train on it * * - deny: use only providers which do not collect user data. */ export declare const DataCollection: { readonly Deny: "deny"; readonly Allow: "allow"; }; /** * Data collection setting. If no available model provider meets the requirement, your request will return an error. * * @remarks * - allow: (default) allow providers which store user data non-transiently and may train on it * * - deny: use only providers which do not collect user data. */ export type DataCollection = OpenEnum; export type Ignore = ProviderName | string; /** * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. */ export type MaxPrice = { audio?: string | undefined; completion?: string | undefined; image?: string | undefined; /** * Price per million prompt tokens */ prompt?: string | undefined; request?: string | undefined; }; export type Only = ProviderName | string; export type Order = ProviderName | string; /** * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. */ export type Sort = ProviderSort | ProviderSortConfig | any; /** * When multiple model providers are available, optionally indicate your routing preference. */ export type ProviderPreferences = { /** * Whether to allow backup providers to serve requests * * @remarks * - true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider. * - false: use only the primary/custom provider, and return the upstream error if it's unavailable. */ allowFallbacks?: boolean | null | undefined; /** * Data collection setting. If no available model provider meets the requirement, your request will return an error. * * @remarks * - allow: (default) allow providers which store user data non-transiently and may train on it * * - deny: use only providers which do not collect user data. */ dataCollection?: DataCollection | null | undefined; /** * Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used. */ enforceDistillableText?: boolean | null | undefined; /** * List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. */ ignore?: Array | null | undefined; /** * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. */ maxPrice?: MaxPrice | undefined; /** * List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. */ only?: Array | null | undefined; /** * An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. */ order?: Array | null | undefined; /** * Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. */ preferredMaxLatency?: PreferredMaxLatency | null | undefined; /** * Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. */ preferredMinThroughput?: PreferredMinThroughput | null | undefined; /** * A list of quantization levels to filter the provider by. */ quantizations?: Array | null | undefined; /** * Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest. */ requireParameters?: boolean | null | undefined; /** * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. */ sort?: ProviderSort | ProviderSortConfig | any | null | undefined; /** * Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used. */ zdr?: boolean | null | undefined; }; /** @internal */ export declare const DataCollection$outboundSchema: z.ZodType; /** @internal */ export type Ignore$Outbound = string | string; /** @internal */ export declare const Ignore$outboundSchema: z.ZodType; export declare function ignoreToJSON(ignore: Ignore): string; /** @internal */ export type MaxPrice$Outbound = { audio?: string | undefined; completion?: string | undefined; image?: string | undefined; prompt?: string | undefined; request?: string | undefined; }; /** @internal */ export declare const MaxPrice$outboundSchema: z.ZodType; export declare function maxPriceToJSON(maxPrice: MaxPrice): string; /** @internal */ export type Only$Outbound = string | string; /** @internal */ export declare const Only$outboundSchema: z.ZodType; export declare function onlyToJSON(only: Only): string; /** @internal */ export type Order$Outbound = string | string; /** @internal */ export declare const Order$outboundSchema: z.ZodType; export declare function orderToJSON(order: Order): string; /** @internal */ export type Sort$Outbound = string | ProviderSortConfig$Outbound | any; /** @internal */ export declare const Sort$outboundSchema: z.ZodType; export declare function sortToJSON(sort: Sort): string; /** @internal */ export type ProviderPreferences$Outbound = { allow_fallbacks?: boolean | null | undefined; data_collection?: string | null | undefined; enforce_distillable_text?: boolean | null | undefined; ignore?: Array | null | undefined; max_price?: MaxPrice$Outbound | undefined; only?: Array | null | undefined; order?: Array | null | undefined; preferred_max_latency?: PreferredMaxLatency$Outbound | null | undefined; preferred_min_throughput?: PreferredMinThroughput$Outbound | null | undefined; quantizations?: Array | null | undefined; require_parameters?: boolean | null | undefined; sort?: string | ProviderSortConfig$Outbound | any | null | undefined; zdr?: boolean | null | undefined; }; /** @internal */ export declare const ProviderPreferences$outboundSchema: z.ZodType; export declare function providerPreferencesToJSON(providerPreferences: ProviderPreferences): string; //# sourceMappingURL=providerpreferences.d.ts.map