UNPKG

@adaline/provider

Version:
1,619 lines (1,606 loc) 81.2 kB
import { GatewayBaseError, RoleEnum, ModalityEnum, MessageType, ConfigType, ToolType, ChatResponseType, PartialChatResponseType, ChatModelPriceType, EmbeddingModalityEnum, EmbeddingRequestsType, EmbeddingResponseType } from '@adaline/types'; import { z } from 'zod'; declare class ProviderError extends GatewayBaseError { readonly name: "ProviderError"; readonly info: string; readonly cause: unknown; constructor({ info, cause }: { info: string; cause: unknown; }); static isProviderError(error: unknown): error is ProviderError; } declare class ModelError extends GatewayBaseError { readonly name: "ModelError"; readonly info: string; readonly cause: unknown; constructor({ info, cause }: { info: string; cause: unknown; }); static isModelError(error: unknown): error is ModelError; } declare class ModelResponseError extends GatewayBaseError { readonly name: "ModelResponseError"; readonly info: string; readonly cause: unknown; constructor({ info, cause }: { info: string; cause: unknown; }); static isModelResponseError(error: unknown): error is ModelResponseError; } declare class InvalidModelRequestError extends GatewayBaseError { readonly name: "InvalidModelRequestError"; readonly info: string; readonly cause: unknown; constructor({ info, cause }: { info: string; cause: unknown; }); static isInvalidModelRequestError(error: unknown): error is InvalidModelRequestError; } declare class InvalidConfigError extends GatewayBaseError { readonly name: "InvalidConfigError"; readonly info: string; readonly cause: unknown; constructor({ info, cause }: { info: string; cause: unknown; }); static isInvalidConfigError(error: unknown): error is InvalidConfigError; } declare class InvalidMessagesError extends GatewayBaseError { readonly name: "InvalidMessagesError"; readonly info: string; readonly cause: unknown; constructor({ info, cause }: { info: string; cause: unknown; }); static isInvalidMessagesError(error: unknown): error is InvalidMessagesError; } declare class InvalidToolsError extends GatewayBaseError { readonly name: "InvalidToolsError"; readonly info: string; readonly cause: unknown; constructor({ info, cause }: { info: string; cause: unknown; }); static isInvalidToolsError(error: unknown): error is InvalidToolsError; } declare class InvalidEmbeddingRequestsError extends GatewayBaseError { readonly name: "InvalidEmbeddingRequestsError"; readonly info: string; readonly cause: unknown; constructor({ info, cause }: { info: string; cause: unknown; }); static isInvalidEmbeddingRequestsError(error: unknown): error is InvalidEmbeddingRequestsError; } declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.ZodEnum<["system", "user", "assistant", "tool"]>, M extends z.ZodEnum<[string, ...string[]]> = z.ZodEnum<["text", "image", "pdf", "tool-call", "tool-response", "reasoning"]>>(Roles?: R, Modalities?: M) => z.ZodObject<{ name: z.ZodString; description: z.ZodString; roles: z.ZodRecord<R, z.ZodOptional<z.ZodString>>; modalities: z.ZodArray<M, "atleastone">; maxInputTokens: z.ZodNumber; maxOutputTokens: z.ZodNumber; maxReasoningTokens: z.ZodOptional<z.ZodNumber>; config: z.ZodEffects<z.ZodObject<{ def: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodLiteral<"range">; param: z.ZodString; title: z.ZodString; description: z.ZodString; min: z.ZodNumber; max: z.ZodNumber; step: z.ZodNumber; default: z.ZodNumber; }, "strip", z.ZodTypeAny, { type: "range"; param: string; title: string; description: string; max: number; default: number; min: number; step: number; }, { type: "range"; param: string; title: string; description: string; max: number; default: number; min: number; step: number; }>, z.ZodObject<{ type: z.ZodLiteral<"multi-string">; param: z.ZodString; title: z.ZodString; description: z.ZodString; max: z.ZodNumber; }, "strip", z.ZodTypeAny, { type: "multi-string"; param: string; title: string; description: string; max: number; }, { type: "multi-string"; param: string; title: string; description: string; max: number; }>, z.ZodObject<{ type: z.ZodLiteral<"select-string">; param: z.ZodString; title: z.ZodString; description: z.ZodString; default: z.ZodString; choices: z.ZodArray<z.ZodString, "many">; }, "strip", z.ZodTypeAny, { type: "select-string"; param: string; title: string; description: string; default: string; choices: string[]; }, { type: "select-string"; param: string; title: string; description: string; default: string; choices: string[]; }>, z.ZodObject<{ type: z.ZodLiteral<"select-boolean">; param: z.ZodString; title: z.ZodString; description: z.ZodString; default: z.ZodNullable<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { type: "select-boolean"; param: string; title: string; description: string; default: boolean | null; }, { type: "select-boolean"; param: string; title: string; description: string; default: boolean | null; }>, z.ZodObject<{ type: z.ZodLiteral<"object-schema">; param: z.ZodString; title: z.ZodString; description: z.ZodString; objectSchema: z.ZodAny; }, "strip", z.ZodTypeAny, { type: "object-schema"; param: string; title: string; description: string; objectSchema?: any; }, { type: "object-schema"; param: string; title: string; description: string; objectSchema?: any; }>]>>; schema: z.ZodType<z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>, z.ZodTypeDef, z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>>; }, "strip", z.ZodTypeAny, { def: Record<string, { type: "multi-string"; param: string; title: string; description: string; max: number; } | { type: "object-schema"; param: string; title: string; description: string; objectSchema?: any; } | { type: "range"; param: string; title: string; description: string; max: number; default: number; min: number; step: number; } | { type: "select-boolean"; param: string; title: string; description: string; default: boolean | null; } | { type: "select-string"; param: string; title: string; description: string; default: string; choices: string[]; }>; schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>; }, { def: Record<string, { type: "multi-string"; param: string; title: string; description: string; max: number; } | { type: "object-schema"; param: string; title: string; description: string; objectSchema?: any; } | { type: "range"; param: string; title: string; description: string; max: number; default: number; min: number; step: number; } | { type: "select-boolean"; param: string; title: string; description: string; default: boolean | null; } | { type: "select-string"; param: string; title: string; description: string; default: string; choices: string[]; }>; schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>; }>, { def: Record<string, { type: "multi-string"; param: string; title: string; description: string; max: number; } | { type: "object-schema"; param: string; title: string; description: string; objectSchema?: any; } | { type: "range"; param: string; title: string; description: string; max: number; default: number; min: number; step: number; } | { type: "select-boolean"; param: string; title: string; description: string; default: boolean | null; } | { type: "select-string"; param: string; title: string; description: string; default: string; choices: string[]; }>; schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>; }, { def: Record<string, { type: "multi-string"; param: string; title: string; description: string; max: number; } | { type: "object-schema"; param: string; title: string; description: string; objectSchema?: any; } | { type: "range"; param: string; title: string; description: string; max: number; default: number; min: number; step: number; } | { type: "select-boolean"; param: string; title: string; description: string; default: boolean | null; } | { type: "select-string"; param: string; title: string; description: string; default: string; choices: string[]; }>; schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>; }>; price: z.ZodType<{ modelName: string; currency: string; tokenRanges: { minTokens: number; prices: { base: { inputPricePerMillion: number; outputPricePerMillion: number; }; }; maxTokens?: number | null | undefined; }[]; }, z.ZodTypeDef, { modelName: string; currency: string; tokenRanges: { minTokens: number; prices: { base: { inputPricePerMillion: number; outputPricePerMillion: number; }; }; maxTokens?: number | null | undefined; }[]; }>; }, "strip", z.ZodTypeAny, { [k in keyof z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{ name: z.ZodString; description: z.ZodString; roles: z.ZodRecord<R, z.ZodOptional<z.ZodString>>; modalities: z.ZodArray<M, "atleastone">; maxInputTokens: z.ZodNumber; maxOutputTokens: z.ZodNumber; maxReasoningTokens: z.ZodOptional<z.ZodNumber>; config: z.ZodEffects<z.ZodObject<{ def: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodLiteral<"range">; param: z.ZodString; title: z.ZodString; description: z.ZodString; min: z.ZodNumber; max: z.ZodNumber; step: z.ZodNumber; default: z.ZodNumber; }, "strip", z.ZodTypeAny, { type: "range"; param: string; title: string; description: string; max: number; default: number; min: number; step: number; }, { type: "range"; param: string; title: string; description: string; max: number; default: number; min: number; step: number; }>, z.ZodObject<{ type: z.ZodLiteral<"multi-string">; param: z.ZodString; title: z.ZodString; description: z.ZodString; max: z.ZodNumber; }, "strip", z.ZodTypeAny, { type: "multi-string"; param: string; title: string; description: string; max: number; }, { type: "multi-string"; param: string; title: string; description: string; max: number; }>, z.ZodObject<{ type: z.ZodLiteral<"select-string">; param: z.ZodString; title: z.ZodString; description: z.ZodString; default: z.ZodString; choices: z.ZodArray<z.ZodString, "many">; }, "strip", z.ZodTypeAny, { type: "select-string"; param: string; title: string; description: string; default: string; choices: string[]; }, { type: "select-string"; param: string; title: string; description: string; default: string; choices: string[]; }>, z.ZodObject<{ type: z.ZodLiteral<"select-boolean">; param: z.ZodString; title: z.ZodString; description: z.ZodString; default: z.ZodNullable<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { type: "select-boolean"; param: string; title: string; description: string; default: boolean | null; }, { type: "select-boolean"; param: string; title: string; description: string; default: boolean | null; }>, z.ZodObject<{ type: z.ZodLiteral<"object-schema">; param: z.ZodString; title: z.ZodString; description: z.ZodString; objectSchema: z.ZodAny; }, "strip", z.ZodTypeAny, { type: "object-schema"; param: string; title: string; description: string; objectSchema?: any; }, { type: "object-schema"; param: string; title: string; description: string; objectSchema?: any; }>]>>; schema: z.ZodType<z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>, z.ZodTypeDef, z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>>; }, "strip", z.ZodTypeAny, { def: Record<string, { type: "multi-string"; param: string; title: string; description: string; max: number; } | { type: "object-schema"; param: string; title: string; description: string; objectSchema?: any; } | { type: "range"; param: string; title: string; description: string; max: number; default: number; min: number; step: number; } | { type: "select-boolean"; param: string; title: string; description: string; default: boolean | null; } | { type: "select-string"; param: string; title: string; description: string; default: string; choices: string[]; }>; schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>; }, { def: Record<string, { type: "multi-string"; param: string; title: string; description: string; max: number; } | { type: "object-schema"; param: string; title: string; description: string; objectSchema?: any; } | { type: "range"; param: string; title: string; description: string; max: number; default: number; min: number; step: number; } | { type: "select-boolean"; param: string; title: string; description: string; default: boolean | null; } | { type: "select-string"; param: string; title: string; description: string; default: string; choices: string[]; }>; schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>; }>, { def: Record<string, { type: "multi-string"; param: string; title: string; description: string; max: number; } | { type: "object-schema"; param: string; title: string; description: string; objectSchema?: any; } | { type: "range"; param: string; title: string; description: string; max: number; default: number; min: number; step: number; } | { type: "select-boolean"; param: string; title: string; description: string; default: boolean | null; } | { type: "select-string"; param: string; title: string; description: string; default: string; choices: string[]; }>; schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>; }, { def: Record<string, { type: "multi-string"; param: string; title: string; description: string; max: number; } | { type: "object-schema"; param: string; title: string; description: string; objectSchema?: any; } | { type: "range"; param: string; title: string; description: string; max: number; default: number; min: number; step: number; } | { type: "select-boolean"; param: string; title: string; description: string; default: boolean | null; } | { type: "select-string"; param: string; title: string; description: string; default: string; choices: string[]; }>; schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>; }>; price: z.ZodType<{ modelName: string; currency: string; tokenRanges: { minTokens: number; prices: { base: { inputPricePerMillion: number; outputPricePerMillion: number; }; }; maxTokens?: number | null | undefined; }[]; }, z.ZodTypeDef, { modelName: string; currency: string; tokenRanges: { minTokens: number; prices: { base: { inputPricePerMillion: number; outputPricePerMillion: number; }; }; maxTokens?: number | null | undefined; }[]; }>; }>, any>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{ name: z.ZodString; description: z.ZodString; roles: z.ZodRecord<R, z.ZodOptional<z.ZodString>>; modalities: z.ZodArray<M, "atleastone">; maxInputTokens: z.ZodNumber; maxOutputTokens: z.ZodNumber; maxReasoningTokens: z.ZodOptional<z.ZodNumber>; config: z.ZodEffects<z.ZodObject<{ def: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodLiteral<"range">; param: z.ZodString; title: z.ZodString; description: z.ZodString; min: z.ZodNumber; max: z.ZodNumber; step: z.ZodNumber; default: z.ZodNumber; }, "strip", z.ZodTypeAny, { type: "range"; param: string; title: string; description: string; max: number; default: number; min: number; step: number; }, { type: "range"; param: string; title: string; description: string; max: number; default: number; min: number; step: number; }>, z.ZodObject<{ type: z.ZodLiteral<"multi-string">; param: z.ZodString; title: z.ZodString; description: z.ZodString; max: z.ZodNumber; }, "strip", z.ZodTypeAny, { type: "multi-string"; param: string; title: string; description: string; max: number; }, { type: "multi-string"; param: string; title: string; description: string; max: number; }>, z.ZodObject<{ type: z.ZodLiteral<"select-string">; param: z.ZodString; title: z.ZodString; description: z.ZodString; default: z.ZodString; choices: z.ZodArray<z.ZodString, "many">; }, "strip", z.ZodTypeAny, { type: "select-string"; param: string; title: string; description: string; default: string; choices: string[]; }, { type: "select-string"; param: string; title: string; description: string; default: string; choices: string[]; }>, z.ZodObject<{ type: z.ZodLiteral<"select-boolean">; param: z.ZodString; title: z.ZodString; description: z.ZodString; default: z.ZodNullable<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { type: "select-boolean"; param: string; title: string; description: string; default: boolean | null; }, { type: "select-boolean"; param: string; title: string; description: string; default: boolean | null; }>, z.ZodObject<{ type: z.ZodLiteral<"object-schema">; param: z.ZodString; title: z.ZodString; description: z.ZodString; objectSchema: z.ZodAny; }, "strip", z.ZodTypeAny, { type: "object-schema"; param: string; title: string; description: string; objectSchema?: any; }, { type: "object-schema"; param: string; title: string; description: string; objectSchema?: any; }>]>>; schema: z.ZodType<z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>, z.ZodTypeDef, z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>>; }, "strip", z.ZodTypeAny, { def: Record<string, { type: "multi-string"; param: string; title: string; description: string; max: number; } | { type: "object-schema"; param: string; title: string; description: string; objectSchema?: any; } | { type: "range"; param: string; title: string; description: string; max: number; default: number; min: number; step: number; } | { type: "select-boolean"; param: string; title: string; description: string; default: boolean | null; } | { type: "select-string"; param: string; title: string; description: string; default: string; choices: string[]; }>; schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>; }, { def: Record<string, { type: "multi-string"; param: string; title: string; description: string; max: number; } | { type: "object-schema"; param: string; title: string; description: string; objectSchema?: any; } | { type: "range"; param: string; title: string; description: string; max: number; default: number; min: number; step: number; } | { type: "select-boolean"; param: string; title: string; description: string; default: boolean | null; } | { type: "select-string"; param: string; title: string; description: string; default: string; choices: string[]; }>; schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>; }>, { def: Record<string, { type: "multi-string"; param: string; title: string; description: string; max: number; } | { type: "object-schema"; param: string; title: string; description: string; objectSchema?: any; } | { type: "range"; param: string; title: string; description: string; max: number; default: number; min: number; step: number; } | { type: "select-boolean"; param: string; title: string; description: string; default: boolean | null; } | { type: "select-string"; param: string; title: string; description: string; default: string; choices: string[]; }>; schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>; }, { def: Record<string, { type: "multi-string"; param: string; title: string; description: string; max: number; } | { type: "object-schema"; param: string; title: string; description: string; objectSchema?: any; } | { type: "range"; param: string; title: string; description: string; max: number; default: number; min: number; step: number; } | { type: "select-boolean"; param: string; title: string; description: string; default: boolean | null; } | { type: "select-string"; param: string; title: string; description: string; default: string; choices: string[]; }>; schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>; }>; price: z.ZodType<{ modelName: string; currency: string; tokenRanges: { minTokens: number; prices: { base: { inputPricePerMillion: number; outputPricePerMillion: number; }; }; maxTokens?: number | null | undefined; }[]; }, z.ZodTypeDef, { modelName: string; currency: string; tokenRanges: { minTokens: number; prices: { base: { inputPricePerMillion: number; outputPricePerMillion: number; }; }; maxTokens?: number | null | undefined; }[]; }>; }>, any>[k]; }, { [k_1 in keyof z.baseObjectInputType<{ name: z.ZodString; description: z.ZodString; roles: z.ZodRecord<R, z.ZodOptional<z.ZodString>>; modalities: z.ZodArray<M, "atleastone">; maxInputTokens: z.ZodNumber; maxOutputTokens: z.ZodNumber; maxReasoningTokens: z.ZodOptional<z.ZodNumber>; config: z.ZodEffects<z.ZodObject<{ def: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodLiteral<"range">; param: z.ZodString; title: z.ZodString; description: z.ZodString; min: z.ZodNumber; max: z.ZodNumber; step: z.ZodNumber; default: z.ZodNumber; }, "strip", z.ZodTypeAny, { type: "range"; param: string; title: string; description: string; max: number; default: number; min: number; step: number; }, { type: "range"; param: string; title: string; description: string; max: number; default: number; min: number; step: number; }>, z.ZodObject<{ type: z.ZodLiteral<"multi-string">; param: z.ZodString; title: z.ZodString; description: z.ZodString; max: z.ZodNumber; }, "strip", z.ZodTypeAny, { type: "multi-string"; param: string; title: string; description: string; max: number; }, { type: "multi-string"; param: string; title: string; description: string; max: number; }>, z.ZodObject<{ type: z.ZodLiteral<"select-string">; param: z.ZodString; title: z.ZodString; description: z.ZodString; default: z.ZodString; choices: z.ZodArray<z.ZodString, "many">; }, "strip", z.ZodTypeAny, { type: "select-string"; param: string; title: string; description: string; default: string; choices: string[]; }, { type: "select-string"; param: string; title: string; description: string; default: string; choices: string[]; }>, z.ZodObject<{ type: z.ZodLiteral<"select-boolean">; param: z.ZodString; title: z.ZodString; description: z.ZodString; default: z.ZodNullable<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { type: "select-boolean"; param: string; title: string; description: string; default: boolean | null; }, { type: "select-boolean"; param: string; title: string; description: string; default: boolean | null; }>, z.ZodObject<{ type: z.ZodLiteral<"object-schema">; param: z.ZodString; title: z.ZodString; description: z.ZodString; objectSchema: z.ZodAny; }, "strip", z.ZodTypeAny, { type: "object-schema"; param: string; title: string; description: string; objectSchema?: any; }, { type: "object-schema"; param: string; title: string; description: string; objectSchema?: any; }>]>>; schema: z.ZodType<z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>, z.ZodTypeDef, z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>>; }, "strip", z.ZodTypeAny, { def: Record<string, { type: "multi-string"; param: string; title: string; description: string; max: number; } | { type: "object-schema"; param: string; title: string; description: string; objectSchema?: any; } | { type: "range"; param: string; title: string; description: string; max: number; default: number; min: number; step: number; } | { type: "select-boolean"; param: string; title: string; description: string; default: boolean | null; } | { type: "select-string"; param: string; title: string; description: string; default: string; choices: string[]; }>; schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>; }, { def: Record<string, { type: "multi-string"; param: string; title: string; description: string; max: number; } | { type: "object-schema"; param: string; title: string; description: string; objectSchema?: any; } | { type: "range"; param: string; title: string; description: string; max: number; default: number; min: number; step: number; } | { type: "select-boolean"; param: string; title: string; description: string; default: boolean | null; } | { type: "select-string"; param: string; title: string; description: string; default: string; choices: string[]; }>; schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>; }>, { def: Record<string, { type: "multi-string"; param: string; title: string; description: string; max: number; } | { type: "object-schema"; param: string; title: string; description: string; objectSchema?: any; } | { type: "range"; param: string; title: string; description: string; max: number; default: number; min: number; step: number; } | { type: "select-boolean"; param: string; title: string; description: string; default: boolean | null; } | { type: "select-string"; param: string; title: string; description: string; default: string; choices: string[]; }>; schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>; }, { def: Record<string, { type: "multi-string"; param: string; title: string; description: string; max: number; } | { type: "object-schema"; param: string; title: string; description: string; objectSchema?: any; } | { type: "range"; param: string; title: string; description: string; max: number; default: number; min: number; step: number; } | { type: "select-boolean"; param: string; title: string; description: string; default: boolean | null; } | { type: "select-string"; param: string; title: string; description: string; default: string; choices: string[]; }>; schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>; }>; price: z.ZodType<{ modelName: string; currency: string; tokenRanges: { minTokens: number; prices: { base: { inputPricePerMillion: number; outputPricePerMillion: number; }; }; maxTokens?: number | null | undefined; }[]; }, z.ZodTypeDef, { modelName: string; currency: string; tokenRanges: { minTokens: number; prices: { base: { inputPricePerMillion: number; outputPricePerMillion: number; }; }; maxTokens?: number | null | undefined; }[]; }>; }>]: z.baseObjectInputType<{ name: z.ZodString; description: z.ZodString; roles: z.ZodRecord<R, z.ZodOptional<z.ZodString>>; modalities: z.ZodArray<M, "atleastone">; maxInputTokens: z.ZodNumber; maxOutputTokens: z.ZodNumber; maxReasoningTokens: z.ZodOptional<z.ZodNumber>; config: z.ZodEffects<z.ZodObject<{ def: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodLiteral<"range">; param: z.ZodString; title: z.ZodString; description: z.ZodString; min: z.ZodNumber; max: z.ZodNumber; step: z.ZodNumber; default: z.ZodNumber; }, "strip", z.ZodTypeAny, { type: "range"; param: string; title: string; description: string; max: number; default: number; min: number; step: number; }, { type: "range"; param: string; title: string; description: string; max: number; default: number; min: number; step: number; }>, z.ZodObject<{ type: z.ZodLiteral<"multi-string">; param: z.ZodString; title: z.ZodString; description: z.ZodString; max: z.ZodNumber; }, "strip", z.ZodTypeAny, { type: "multi-string"; param: string; title: string; description: string; max: number; }, { type: "multi-string"; param: string; title: string; description: string; max: number; }>, z.ZodObject<{ type: z.ZodLiteral<"select-string">; param: z.ZodString; title: z.ZodString; description: z.ZodString; default: z.ZodString; choices: z.ZodArray<z.ZodString, "many">; }, "strip", z.ZodTypeAny, { type: "select-string"; param: string; title: string; description: string; default: string; choices: string[]; }, { type: "select-string"; param: string; title: string; description: string; default: string; choices: string[]; }>, z.ZodObject<{ type: z.ZodLiteral<"select-boolean">; param: z.ZodString; title: z.ZodString; description: z.ZodString; default: z.ZodNullable<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { type: "select-boolean"; param: string; title: string; description: string; default: boolean | null; }, { type: "select-boolean"; param: string; title: string; description: string; default: boolean | null; }>, z.ZodObject<{ type: z.ZodLiteral<"object-schema">; param: z.ZodString; title: z.ZodString; description: z.ZodString; objectSchema: z.ZodAny; }, "strip", z.ZodTypeAny, { type: "object-schema"; param: string; title: string; description: string; objectSchema?: any; }, { type: "object-schema"; param: string; title: string; description: string; objectSchema?: any; }>]>>; schema: z.ZodType<z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>, z.ZodTypeDef, z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>>; }, "strip", z.ZodTypeAny, { def: Record<string, { type: "multi-string"; param: string; title: string; description: string; max: number; } | { type: "object-schema"; param: string; title: string; description: string; objectSchema?: any; } | { type: "range"; param: string; title: string; description: string; max: number; default: number; min: number; step: number; } | { type: "select-boolean"; param: string; title: string; description: string; default: boolean | null; } | { type: "select-string"; param: string; title: string; description: string; default: string; choices: string[]; }>; schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>; }, { def: Record<string, { type: "multi-string"; param: string; title: string; description: string; max: number; } | { type: "object-schema"; param: string; title: string; description: string; objectSchema?: any; } | { type: "range"; param: string; title: string; description: string; max: number; default: number; min: number; step: number; } | { type: "select-boolean"; param: string; title: string; description: string; default: boolean | null; } | { type: "select-string"; param: string; title: string; description: string; default: string; choices: string[]; }>; schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>; }>, { def: Record<string, { type: "multi-string"; param: string; title: string; description: string; max: number; } | { type: "object-schema"; param: string; title: string; description: string; objectSchema?: any; } | { type: "range"; param: string; title: string; description: string; max: number; default: number; min: number; step: number; } | { type: "select-boolean"; param: string; title: string; description: string; default: boolean | null; } | { type: "select-string"; param: string; title: string; description: string; default: string; choices: string[]; }>; schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>; }, { def: Record<string, { type: "multi-string"; param: string; title: string; description: string; max: number; } | { type: "object-schema"; param: string; title: string; description: string; objectSchema?: any; } | { type: "range"; param: string; title: string; description: string; max: number; default: number; min: number; step: number; } | { type: "select-boolean"; param: string; title: string; description: string; default: boolean | null; } | { type: "select-string"; param: string; title: string; description: string; default: string; choices: string[]; }>; schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>; }>; price: z.ZodType<{ modelName: string; currency: string; tokenRanges: { minTokens: number; prices: { base: { inputPricePerMillion: number; outputPricePerMillion: number; }; }; maxTokens?: number | null | undefined; }[]; }, z.ZodTypeDef, { modelName: string; currency: string; tokenRanges: { minTokens: number; prices: { base: { inputPricePerMillion: number; outputPricePerMillion: number; }; }; maxTokens?: number | null | undefined; }[]; }>; }>[k_1]; }>; type ChatModelSchemaType<R extends z.ZodEnum<[string, ...string[]]> = typeof RoleEnum, M extends z.ZodEnum<[string, ...string[]]> = typeof ModalityEnum> = z.infer<ReturnType<typeof ChatModelSchema<R, M>>>; declare const Headers: z.ZodRecord<z.ZodString, z.ZodString>; type HeadersType = z.infer<typeof Headers>; declare const Params: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, z.ZodArray<z.ZodAny, "many">, z.ZodNull, z.ZodUndefined]>>; type ParamsType = z.infer<typeof Params>; declare const Url: z.ZodString; type UrlType = z.infer<typeof Url>; declare const ConfigItemLiterals: readonly ["range", "multi-string", "select-string", "object-schema", "select-boolean"]; declare const ConfigItemEnum: z.ZodEnum<["range", "multi-string", "select-string", "object-schema", "select-boolean"]>; type ConfigItemEnumType = z.infer<typeof ConfigItemEnum>; declare const ConfigItemDef: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodLiteral<"range">; param: z.ZodString; title: z.ZodString; description: z.ZodString; min: z.ZodNumber; max: z.ZodNumber; step: z.ZodNumber; default: z.ZodNumber; }, "strip", z.ZodTypeAny, { type: "range"; param: string; title: string; description: string; max: number; default: number; min: number; step: number; }, { type: "range"; param: string; title: string; description: string; max: number; default: number; min: number; step: number; }>, z.ZodObject<{ type: z.ZodLiteral<"multi-string">; param: z.ZodString; title: z.ZodString; description: z.ZodString; max: z.ZodNumber; }, "strip", z.ZodTypeAny, { type: "multi-string"; param: string; title: string; description: string; max: number; }, { type: "multi-string"; param: string; title: string; description: string; max: number; }>, z.ZodObject<{ type: z.ZodLiteral<"select-string">; param: z.ZodString; title: z.ZodString; description: z.ZodString; default: z.ZodString; choices: z.ZodArray<z.ZodString, "many">; }, "strip", z.ZodTypeAny, { type: "select-string"; param: string; title: string; description: string; default: string; choices: string[]; }, { type: "select-string"; param: string; title: string; description: string; default: string; choices: string[]; }>, z.ZodObject<{ type: z.ZodLiteral<"sel