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 { ProviderOptions, ProviderOptions$Outbound } from "./provideroptions.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 ProviderPreferencesIgnore = 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 = { /** * Maximum price in USD per audio unit */ audio?: string | undefined; /** * Maximum price in USD per million completion tokens */ completion?: string | undefined; /** * Maximum price in USD per image */ image?: string | undefined; /** * Maximum price in USD per million prompt tokens */ prompt?: string | undefined; /** * Maximum price in USD per request */ request?: string | undefined; }; export type ProviderPreferencesOnly = ProviderName | string; export type ProviderPreferencesOrder = ProviderName | string; /** * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. */ export type ProviderPreferencesSort = ProviderSort | ProviderSortConfig; /** * Provider routing preferences for the request. */ 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; /** * Provider-specific options keyed by provider slug. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. */ options?: ProviderOptions | 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 | 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 ProviderPreferencesIgnore$Outbound = string | string; /** @internal */ export declare const ProviderPreferencesIgnore$outboundSchema: z.ZodType; export declare function providerPreferencesIgnoreToJSON(providerPreferencesIgnore: ProviderPreferencesIgnore): 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 ProviderPreferencesOnly$Outbound = string | string; /** @internal */ export declare const ProviderPreferencesOnly$outboundSchema: z.ZodType; export declare function providerPreferencesOnlyToJSON(providerPreferencesOnly: ProviderPreferencesOnly): string; /** @internal */ export type ProviderPreferencesOrder$Outbound = string | string; /** @internal */ export declare const ProviderPreferencesOrder$outboundSchema: z.ZodType; export declare function providerPreferencesOrderToJSON(providerPreferencesOrder: ProviderPreferencesOrder): string; /** @internal */ export type ProviderPreferencesSort$Outbound = string | ProviderSortConfig$Outbound; /** @internal */ export declare const ProviderPreferencesSort$outboundSchema: z.ZodType; export declare function providerPreferencesSortToJSON(providerPreferencesSort: ProviderPreferencesSort): 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; options?: ProviderOptions$Outbound | 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 | 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