@adaline/provider
Version:
Adaline Provider
1,587 lines (1,578 loc) • 131 kB
TypeScript
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", "error", "search-result"]>>(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;
}>, z.ZodObject<{
type: z.ZodLiteral<"paired-select">;
param: z.ZodString;
title: z.ZodString;
description: z.ZodString;
fields: z.ZodTuple<[z.ZodObject<{
key: z.ZodString;
label: z.ZodString;
description: z.ZodOptional<z.ZodString>;
choices: z.ZodArray<z.ZodObject<{
value: z.ZodString;
label: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
label: string;
}, {
value: string;
label: string;
}>, "many">;
}, "strip", z.ZodTypeAny, {
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}, {
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}>, z.ZodObject<{
key: z.ZodString;
label: z.ZodString;
description: z.ZodOptional<z.ZodString>;
choices: z.ZodArray<z.ZodObject<{
value: z.ZodString;
label: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
label: string;
}, {
value: string;
label: string;
}>, "many">;
}, "strip", z.ZodTypeAny, {
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}, {
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}>], null>;
uniqueByField: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
type: "paired-select";
param: string;
title: string;
description: string;
fields: [{
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}, {
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}];
uniqueByField?: string | undefined;
}, {
type: "paired-select";
param: string;
title: string;
description: string;
fields: [{
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}, {
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}];
uniqueByField?: string | undefined;
}>]>>;
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: "paired-select";
param: string;
title: string;
description: string;
fields: [{
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}, {
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}];
uniqueByField?: string | undefined;
} | {
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: "paired-select";
param: string;
title: string;
description: string;
fields: [{
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}, {
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}];
uniqueByField?: string | undefined;
} | {
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: "paired-select";
param: string;
title: string;
description: string;
fields: [{
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}, {
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}];
uniqueByField?: string | undefined;
} | {
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: "paired-select";
param: string;
title: string;
description: string;
fields: [{
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}, {
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}];
uniqueByField?: string | undefined;
} | {
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;
}>, z.ZodObject<{
type: z.ZodLiteral<"paired-select">;
param: z.ZodString;
title: z.ZodString;
description: z.ZodString;
fields: z.ZodTuple<[z.ZodObject<{
key: z.ZodString;
label: z.ZodString;
description: z.ZodOptional<z.ZodString>;
choices: z.ZodArray<z.ZodObject<{
value: z.ZodString;
label: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
label: string;
}, {
value: string;
label: string;
}>, "many">;
}, "strip", z.ZodTypeAny, {
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}, {
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}>, z.ZodObject<{
key: z.ZodString;
label: z.ZodString;
description: z.ZodOptional<z.ZodString>;
choices: z.ZodArray<z.ZodObject<{
value: z.ZodString;
label: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
label: string;
}, {
value: string;
label: string;
}>, "many">;
}, "strip", z.ZodTypeAny, {
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}, {
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}>], null>;
uniqueByField: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
type: "paired-select";
param: string;
title: string;
description: string;
fields: [{
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}, {
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}];
uniqueByField?: string | undefined;
}, {
type: "paired-select";
param: string;
title: string;
description: string;
fields: [{
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}, {
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}];
uniqueByField?: string | undefined;
}>]>>;
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: "paired-select";
param: string;
title: string;
description: string;
fields: [{
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}, {
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}];
uniqueByField?: string | undefined;
} | {
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: "paired-select";
param: string;
title: string;
description: string;
fields: [{
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}, {
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}];
uniqueByField?: string | undefined;
} | {
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: "paired-select";
param: string;
title: string;
description: string;
fields: [{
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}, {
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}];
uniqueByField?: string | undefined;
} | {
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: "paired-select";
param: string;
title: string;
description: string;
fields: [{
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}, {
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}];
uniqueByField?: string | undefined;
} | {
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;
}>, z.ZodObject<{
type: z.ZodLiteral<"paired-select">;
param: z.ZodString;
title: z.ZodString;
description: z.ZodString;
fields: z.ZodTuple<[z.ZodObject<{
key: z.ZodString;
label: z.ZodString;
description: z.ZodOptional<z.ZodString>;
choices: z.ZodArray<z.ZodObject<{
value: z.ZodString;
label: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
label: string;
}, {
value: string;
label: string;
}>, "many">;
}, "strip", z.ZodTypeAny, {
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}, {
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}>, z.ZodObject<{
key: z.ZodString;
label: z.ZodString;
description: z.ZodOptional<z.ZodString>;
choices: z.ZodArray<z.ZodObject<{
value: z.ZodString;
label: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
label: string;
}, {
value: string;
label: string;
}>, "many">;
}, "strip", z.ZodTypeAny, {
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}, {
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}>], null>;
uniqueByField: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
type: "paired-select";
param: string;
title: string;
description: string;
fields: [{
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}, {
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}];
uniqueByField?: string | undefined;
}, {
type: "paired-select";
param: string;
title: string;
description: string;
fields: [{
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}, {
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}];
uniqueByField?: string | undefined;
}>]>>;
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: "paired-select";
param: string;
title: string;
description: string;
fields: [{
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}, {
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}];
uniqueByField?: string | undefined;
} | {
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: "paired-select";
param: string;
title: string;
description: string;
fields: [{
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}, {
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}];
uniqueByField?: string | undefined;
} | {
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: "paired-select";
param: string;
title: string;
description: string;
fields: [{
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}, {
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}];
uniqueByField?: string | undefined;
} | {
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: "paired-select";
param: string;
title: string;
description: string;
fields: [{
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}, {
label: string;
key: string;
choices: {
value: string;
label: string;
}[];
description?: string | undefined;
}];
uniqueByField?: string | undefined;
} | {
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.Z