@adaline/anthropic
Version:
Adaline Anthropic
1,547 lines (1,533 loc) • 170 kB
text/typescript
import * as zod from 'zod';
import { z } from 'zod';
import { ChatModelV1, ChatModelSchemaType, UrlType, HeadersType, ParamsType, EmbeddingModelSchemaType, EmbeddingModelV1, ProviderV1 } from '@adaline/provider';
import { MessageType, ConfigType, ToolType, ChatResponseType, PartialChatResponseType, ChatModelPriceType, EmbeddingRequestsType, EmbeddingResponseType } from '@adaline/types';
declare const ChatModelBaseConfigSchema: (maxOutputTokens: number, maxSequences: number) => z.ZodObject<{
temperature: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
maxTokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
stop: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
topP: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
topK: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
toolChoice: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodEnum<[string, ...string[]]>>>>;
mcp: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodBoolean>>>;
mcpServers: z.ZodOptional<z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, {
[x: string]: any;
}, {
[x: string]: any;
}>>;
}, "strip", z.ZodTypeAny, {
temperature?: number | undefined;
mcp?: boolean | null | undefined;
maxTokens?: number | undefined;
stop?: string[] | undefined;
topP?: number | undefined;
topK?: number | undefined;
toolChoice?: string | null | undefined;
mcpServers?: {
[x: string]: any;
} | undefined;
}, {
temperature?: number | undefined;
mcp?: boolean | null | undefined;
maxTokens?: number | undefined;
stop?: string[] | undefined;
topP?: number | undefined;
topK?: number | undefined;
toolChoice?: string | null | undefined;
mcpServers?: {
[x: string]: any;
} | undefined;
}>;
declare const ChatModelBaseConfigDef: (maxOutputTokens: number, maxSequences: number) => {
readonly temperature: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
readonly maxTokens: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
readonly stop: {
type: "multi-string";
param: string;
title: string;
description: string;
max: number;
};
readonly topP: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
readonly topK: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
readonly toolChoice: {
type: "select-string";
param: string;
title: string;
description: string;
default: string;
choices: string[];
};
readonly mcp: {
type: "select-boolean";
param: string;
title: string;
description: string;
default: boolean | null;
};
readonly mcpServers: {
type: "object-schema";
param: string;
title: string;
description: string;
objectSchema?: any;
};
};
declare const temperature: {
def: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
schema: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
};
declare const maxTokens: (maxOutputTokens: number) => {
def: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
schema: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
};
declare const stop: (maxSequences: number) => {
def: {
type: "multi-string";
param: string;
title: string;
description: string;
max: number;
};
schema: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
};
declare const topP: {
def: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
schema: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
};
declare const topK: {
def: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
schema: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
};
declare const toolChoice: {
def: {
type: "select-string";
param: string;
title: string;
description: string;
default: string;
choices: string[];
};
schema: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodEnum<[string, ...string[]]>>>>;
};
declare const mcp: {
def: {
type: "select-boolean";
param: string;
title: string;
description: string;
default: boolean | null;
};
schema: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodBoolean>>>;
};
declare const mcpServers: {
def: {
type: "object-schema";
param: string;
title: string;
description: string;
objectSchema?: any;
};
schema: z.ZodOptional<z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, {
[x: string]: any;
}, {
[x: string]: any;
}>>;
};
declare const ChatModelReasoningConfigDef: (maxOutputTokens: number, maxSequences: number, minReasoningToken: number, maxReasoningToken: number) => {
reasoningEnabled: {
type: "select-boolean";
param: string;
title: string;
description: string;
default: boolean | null;
};
maxReasoningTokens: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
temperature: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
maxTokens: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
stop: {
type: "multi-string";
param: string;
title: string;
description: string;
max: number;
};
topP: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
topK: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
toolChoice: {
type: "select-string";
param: string;
title: string;
description: string;
default: string;
choices: string[];
};
mcp: {
type: "select-boolean";
param: string;
title: string;
description: string;
default: boolean | null;
};
mcpServers: {
type: "object-schema";
param: string;
title: string;
description: string;
objectSchema?: any;
};
};
declare const ChatModelReasoningConfigSchema: (maxOutputTokens: number, maxSequences: number, minReasoningToken: number, maxReasoningToken: number) => zod.ZodObject<zod.objectUtil.extendShape<{
temperature: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
maxTokens: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
stop: zod.ZodOptional<zod.ZodDefault<zod.ZodArray<zod.ZodString, "many">>>;
topP: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
topK: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
toolChoice: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodEnum<[string, ...string[]]>>>>;
mcp: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodBoolean>>>;
mcpServers: zod.ZodOptional<zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
[x: string]: any;
}, {
[x: string]: any;
}>>;
}, {
reasoningEnabled: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodBoolean>>>;
maxReasoningTokens: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
}>, "strip", zod.ZodTypeAny, {
temperature?: number | undefined;
mcp?: boolean | null | undefined;
maxTokens?: number | undefined;
stop?: string[] | undefined;
topP?: number | undefined;
topK?: number | undefined;
toolChoice?: string | null | undefined;
mcpServers?: {
[x: string]: any;
} | undefined;
reasoningEnabled?: boolean | null | undefined;
maxReasoningTokens?: number | undefined;
}, {
temperature?: number | undefined;
mcp?: boolean | null | undefined;
maxTokens?: number | undefined;
stop?: string[] | undefined;
topP?: number | undefined;
topK?: number | undefined;
toolChoice?: string | null | undefined;
mcpServers?: {
[x: string]: any;
} | undefined;
reasoningEnabled?: boolean | null | undefined;
maxReasoningTokens?: number | undefined;
}>;
declare const AnthropicChatModelConfigs: {
readonly base: (maxOutputTokens: number, maxSequences: number) => {
def: {
readonly temperature: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
readonly maxTokens: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
readonly stop: {
type: "multi-string";
param: string;
title: string;
description: string;
max: number;
};
readonly topP: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
readonly topK: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
readonly toolChoice: {
type: "select-string";
param: string;
title: string;
description: string;
default: string;
choices: string[];
};
readonly mcp: {
type: "select-boolean";
param: string;
title: string;
description: string;
default: boolean | null;
};
readonly mcpServers: {
type: "object-schema";
param: string;
title: string;
description: string;
objectSchema?: any;
};
};
schema: zod.ZodObject<{
temperature: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
maxTokens: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
stop: zod.ZodOptional<zod.ZodDefault<zod.ZodArray<zod.ZodString, "many">>>;
topP: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
topK: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
toolChoice: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodEnum<[string, ...string[]]>>>>;
mcp: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodBoolean>>>;
mcpServers: zod.ZodOptional<zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
[x: string]: any;
}, {
[x: string]: any;
}>>;
}, "strip", zod.ZodTypeAny, {
temperature?: number | undefined;
mcp?: boolean | null | undefined;
maxTokens?: number | undefined;
stop?: string[] | undefined;
topP?: number | undefined;
topK?: number | undefined;
toolChoice?: string | null | undefined;
mcpServers?: {
[x: string]: any;
} | undefined;
}, {
temperature?: number | undefined;
mcp?: boolean | null | undefined;
maxTokens?: number | undefined;
stop?: string[] | undefined;
topP?: number | undefined;
topK?: number | undefined;
toolChoice?: string | null | undefined;
mcpServers?: {
[x: string]: any;
} | undefined;
}>;
};
readonly extendedThinking: (maxOutputTokens: number, maxSequences: number, minReasoningToken: number, maxReasoningTokens: number) => {
def: {
reasoningEnabled: {
type: "select-boolean";
param: string;
title: string;
description: string;
default: boolean | null;
};
maxReasoningTokens: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
temperature: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
maxTokens: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
stop: {
type: "multi-string";
param: string;
title: string;
description: string;
max: number;
};
topP: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
topK: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
toolChoice: {
type: "select-string";
param: string;
title: string;
description: string;
default: string;
choices: string[];
};
mcp: {
type: "select-boolean";
param: string;
title: string;
description: string;
default: boolean | null;
};
mcpServers: {
type: "object-schema";
param: string;
title: string;
description: string;
objectSchema?: any;
};
};
schema: zod.ZodObject<zod.objectUtil.extendShape<{
temperature: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
maxTokens: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
stop: zod.ZodOptional<zod.ZodDefault<zod.ZodArray<zod.ZodString, "many">>>;
topP: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
topK: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
toolChoice: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodEnum<[string, ...string[]]>>>>;
mcp: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodBoolean>>>;
mcpServers: zod.ZodOptional<zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
[x: string]: any;
}, {
[x: string]: any;
}>>;
}, {
reasoningEnabled: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodBoolean>>>;
maxReasoningTokens: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
}>, "strip", zod.ZodTypeAny, {
temperature?: number | undefined;
mcp?: boolean | null | undefined;
maxTokens?: number | undefined;
stop?: string[] | undefined;
topP?: number | undefined;
topK?: number | undefined;
toolChoice?: string | null | undefined;
mcpServers?: {
[x: string]: any;
} | undefined;
reasoningEnabled?: boolean | null | undefined;
maxReasoningTokens?: number | undefined;
}, {
temperature?: number | undefined;
mcp?: boolean | null | undefined;
maxTokens?: number | undefined;
stop?: string[] | undefined;
topP?: number | undefined;
topK?: number | undefined;
toolChoice?: string | null | undefined;
mcpServers?: {
[x: string]: any;
} | undefined;
reasoningEnabled?: boolean | null | undefined;
maxReasoningTokens?: number | undefined;
}>;
};
};
declare const AnthropicEmbeddingModelConfigs: {
readonly base: () => {
def: {
encodingFormat: {
type: "select-string";
param: string;
title: string;
description: string;
default: string;
choices: string[];
};
inputType: {
type: "select-string";
param: string;
title: string;
description: string;
default: string;
choices: string[];
};
truncation: {
type: "select-boolean";
param: string;
title: string;
description: string;
default: boolean | null;
};
};
schema: zod.ZodObject<{
encodingFormat: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodEnum<[string, ...string[]]>>>>;
inputType: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodEnum<[string, ...string[]]>>>>;
truncation: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodBoolean>>>;
}, "strip", zod.ZodTypeAny, {
truncation?: boolean | null | undefined;
encodingFormat?: string | null | undefined;
inputType?: string | null | undefined;
}, {
truncation?: boolean | null | undefined;
encodingFormat?: string | null | undefined;
inputType?: string | null | undefined;
}>;
};
};
declare const EmbeddingModelBaseConfigSchema: () => z.ZodObject<{
encodingFormat: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodEnum<[string, ...string[]]>>>>;
inputType: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodEnum<[string, ...string[]]>>>>;
truncation: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodBoolean>>>;
}, "strip", z.ZodTypeAny, {
truncation?: boolean | null | undefined;
encodingFormat?: string | null | undefined;
inputType?: string | null | undefined;
}, {
truncation?: boolean | null | undefined;
encodingFormat?: string | null | undefined;
inputType?: string | null | undefined;
}>;
declare const EmbeddingModelBaseConfigDef: () => {
encodingFormat: {
type: "select-string";
param: string;
title: string;
description: string;
default: string;
choices: string[];
};
inputType: {
type: "select-string";
param: string;
title: string;
description: string;
default: string;
choices: string[];
};
truncation: {
type: "select-boolean";
param: string;
title: string;
description: string;
default: boolean | null;
};
};
declare const encodingFormat: {
def: {
type: "select-string";
param: string;
title: string;
description: string;
default: string;
choices: string[];
};
schema: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodEnum<[string, ...string[]]>>>>;
};
declare const inputType: {
def: {
type: "select-string";
param: string;
title: string;
description: string;
default: string;
choices: string[];
};
schema: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodEnum<[string, ...string[]]>>>>;
};
declare const truncation: {
def: {
type: "select-boolean";
param: string;
title: string;
description: string;
default: boolean | null;
};
schema: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodBoolean>>>;
};
declare const BaseChatModelOptions: z.ZodObject<{
modelName: z.ZodString;
apiKey: z.ZodString;
completeChatUrl: z.ZodOptional<z.ZodString>;
streamChatUrl: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
modelName: string;
apiKey: string;
completeChatUrl?: string | undefined;
streamChatUrl?: string | undefined;
}, {
modelName: string;
apiKey: string;
completeChatUrl?: string | undefined;
streamChatUrl?: string | undefined;
}>;
type BaseChatModelOptionsType = z.infer<typeof BaseChatModelOptions>;
declare class BaseChatModel implements ChatModelV1<ChatModelSchemaType> {
readonly version: "v1";
readonly modelName: string;
modelSchema: ChatModelSchemaType;
private readonly apiKey;
private readonly baseUrl;
private readonly completeChatUrl;
private readonly streamChatUrl;
constructor(modelSchema: ChatModelSchemaType, options: BaseChatModelOptionsType);
getDefaultBaseUrl(): UrlType;
getDefaultHeaders(): HeadersType;
getDefaultParams(): ParamsType;
getRetryDelay(responseHeaders: HeadersType, _responseData: unknown): {
shouldRetry: boolean;
delayMs: number;
};
getTokenCount(messages: MessageType[]): number;
transformModelRequest(request: any): {
modelName: string | undefined;
config: ConfigType;
messages: MessageType[];
tools: ToolType[] | undefined;
};
transformConfig(config: ConfigType, messages?: MessageType[], tools?: ToolType[]): ParamsType;
transformMessages(messages: MessageType[]): ParamsType;
transformTools(tools: ToolType[]): ParamsType;
getCompleteChatUrl(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): Promise<UrlType>;
getCompleteChatHeaders(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): Promise<HeadersType>;
getCompleteChatData(config: ConfigType, messages: MessageType[], tools?: ToolType[]): Promise<ParamsType>;
transformCompleteChatResponse(response: any): ChatResponseType;
getStreamChatUrl(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): Promise<UrlType>;
getStreamChatHeaders(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): Promise<HeadersType>;
getStreamChatData(config: ConfigType, messages: MessageType[], tools?: ToolType[]): Promise<ParamsType>;
transformStreamChatResponseChunk(chunk: string, buffer: string): AsyncGenerator<{
partialResponse: PartialChatResponseType;
buffer: string;
}>;
transformProxyStreamChatResponseChunk(chunk: string, buffer: string, data?: any, headers?: Record<string, string>, query?: Record<string, string>): AsyncGenerator<{
partialResponse: PartialChatResponseType;
buffer: string;
}>;
getProxyStreamChatUrl(data?: any, headers?: Record<string, string>, query?: Record<string, string>): Promise<UrlType>;
getProxyCompleteChatUrl(data?: any, headers?: Record<string, string>, query?: Record<string, string>): Promise<UrlType>;
getProxyCompleteChatHeaders(data?: any, headers?: Record<string, string>, query?: Record<string, string>): Promise<HeadersType>;
getProxyStreamChatHeaders(data?: any, headers?: Record<string, string>, query?: Record<string, string>): Promise<HeadersType>;
getModelPricing(): ChatModelPriceType;
}
declare const Claude4Opus20250514Literal = "claude-4-opus-20250514";
declare const Claude4Opus20250514Schema: {
description: string;
name: string;
roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
modalities: ["text" | "image" | "tool-call" | "tool-response" | "reasoning", ...("text" | "image" | "tool-call" | "tool-response" | "reasoning")[]];
maxInputTokens: number;
maxOutputTokens: number;
config: {
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[];
} | {
type: "string";
param: string;
title: string;
description: string;
default?: string | undefined;
minLength?: number | undefined;
maxLength?: number | undefined;
}>;
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
};
price: {
modelName: string;
currency: string;
tokenRanges: {
minTokens: number;
prices: {
base: {
inputPricePerMillion: number;
outputPricePerMillion: number;
};
};
maxTokens?: number | null | undefined;
}[];
};
maxReasoningTokens?: number | undefined;
};
declare const Claude4Opus20250514Options: z.ZodObject<{
modelName: z.ZodString;
apiKey: z.ZodString;
completeChatUrl: z.ZodOptional<z.ZodString>;
streamChatUrl: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
modelName: string;
apiKey: string;
completeChatUrl?: string | undefined;
streamChatUrl?: string | undefined;
}, {
modelName: string;
apiKey: string;
completeChatUrl?: string | undefined;
streamChatUrl?: string | undefined;
}>;
type Claude4Opus20250514OptionsType = z.infer<typeof Claude4Opus20250514Options>;
declare class Claude4Opus20250514 extends BaseChatModel {
constructor(options: Claude4Opus20250514OptionsType);
}
declare const Claude4Sonnet20250514Literal = "claude-4-sonnet-20250514";
declare const Claude4Sonnet20250514Schema: {
description: string;
name: string;
roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
modalities: ["text" | "image" | "tool-call" | "tool-response" | "reasoning", ...("text" | "image" | "tool-call" | "tool-response" | "reasoning")[]];
maxInputTokens: number;
maxOutputTokens: number;
config: {
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[];
} | {
type: "string";
param: string;
title: string;
description: string;
default?: string | undefined;
minLength?: number | undefined;
maxLength?: number | undefined;
}>;
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
};
price: {
modelName: string;
currency: string;
tokenRanges: {
minTokens: number;
prices: {
base: {
inputPricePerMillion: number;
outputPricePerMillion: number;
};
};
maxTokens?: number | null | undefined;
}[];
};
maxReasoningTokens?: number | undefined;
};
declare const Claude4Sonnet20250514Options: z.ZodObject<{
modelName: z.ZodString;
apiKey: z.ZodString;
completeChatUrl: z.ZodOptional<z.ZodString>;
streamChatUrl: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
modelName: string;
apiKey: string;
completeChatUrl?: string | undefined;
streamChatUrl?: string | undefined;
}, {
modelName: string;
apiKey: string;
completeChatUrl?: string | undefined;
streamChatUrl?: string | undefined;
}>;
type Claude4Sonnet20250514OptionsType = z.infer<typeof Claude4Sonnet20250514Options>;
declare class Claude4Sonnet20250514 extends BaseChatModel {
constructor(options: Claude4Sonnet20250514OptionsType);
}
declare const ClaudeOpus4_520251101Literal = "claude-opus-4-5-20251101";
declare const ClaudeOpus4_520251101Schema: {
description: string;
name: string;
roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
modalities: ["text" | "image" | "tool-call" | "tool-response" | "reasoning", ...("text" | "image" | "tool-call" | "tool-response" | "reasoning")[]];
maxInputTokens: number;
maxOutputTokens: number;
config: {
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[];
} | {
type: "string";
param: string;
title: string;
description: string;
default?: string | undefined;
minLength?: number | undefined;
maxLength?: number | undefined;
}>;
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
};
price: {
modelName: string;
currency: string;
tokenRanges: {
minTokens: number;
prices: {
base: {
inputPricePerMillion: number;
outputPricePerMillion: number;
};
};
maxTokens?: number | null | undefined;
}[];
};
maxReasoningTokens?: number | undefined;
};
declare const ClaudeOpus4_520251101Options: z.ZodObject<{
modelName: z.ZodString;
apiKey: z.ZodString;
completeChatUrl: z.ZodOptional<z.ZodString>;
streamChatUrl: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
modelName: string;
apiKey: string;
completeChatUrl?: string | undefined;
streamChatUrl?: string | undefined;
}, {
modelName: string;
apiKey: string;
completeChatUrl?: string | undefined;
streamChatUrl?: string | undefined;
}>;
type ClaudeOpus4_520251101OptionsType = z.infer<typeof ClaudeOpus4_520251101Options>;
declare class ClaudeOpus4_520251101 extends BaseChatModel {
constructor(options: ClaudeOpus4_520251101OptionsType);
}
declare const ClaudeOpus4_6Literal = "claude-opus-4-6";
declare const ClaudeOpus4_6Schema: {
description: string;
name: string;
roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
modalities: ["text" | "image" | "tool-call" | "tool-response" | "reasoning", ...("text" | "image" | "tool-call" | "tool-response" | "reasoning")[]];
maxInputTokens: number;
maxOutputTokens: number;
config: {
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[];
} | {
type: "string";
param: string;
title: string;
description: string;
default?: string | undefined;
minLength?: number | undefined;
maxLength?: number | undefined;
}>;
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
};
price: {
modelName: string;
currency: string;
tokenRanges: {
minTokens: number;
prices: {
base: {
inputPricePerMillion: number;
outputPricePerMillion: number;
};
};
maxTokens?: number | null | undefined;
}[];
};
maxReasoningTokens?: number | undefined;
};
declare const ClaudeOpus4_6Options: z.ZodObject<{
modelName: z.ZodString;
apiKey: z.ZodString;
completeChatUrl: z.ZodOptional<z.ZodString>;
streamChatUrl: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
modelName: string;
apiKey: string;
completeChatUrl?: string | undefined;
streamChatUrl?: string | undefined;
}, {
modelName: string;
apiKey: string;
completeChatUrl?: string | undefined;
streamChatUrl?: string | undefined;
}>;
type ClaudeOpus4_6OptionsType = z.infer<typeof ClaudeOpus4_6Options>;
declare class ClaudeOpus4_6 extends BaseChatModel {
constructor(options: ClaudeOpus4_6OptionsType);
}
declare const ClaudeOpus4_7Literal = "claude-opus-4-7";
declare const ClaudeOpus4_7Schema: {
description: string;
name: string;
roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
modalities: ["text" | "image" | "tool-call" | "tool-response" | "reasoning", ...("text" | "image" | "tool-call" | "tool-response" | "reasoning")[]];
maxInputTokens: number;
maxOutputTokens: number;
config: {
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[];
} | {
type: "string";
param: string;
title: string;
description: string;
default?: string | undefined;
minLength?: number | undefined;
maxLength?: number | undefined;
}>;
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
};
price: {
modelName: string;
currency: string;
tokenRanges: {
minTokens: number;
prices: {
base: {
inputPricePerMillion: number;
outputPricePerMillion: number;
};
};
maxTokens?: number | null | undefined;
}[];
};
maxReasoningTokens?: number | undefined;
};
declare const ClaudeOpus4_7Options: z.ZodObject<{
modelName: z.ZodString;
apiKey: z.ZodString;
completeChatUrl: z.ZodOptional<z.ZodString>;
streamChatUrl: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
modelName: string;
apiKey: string;
completeChatUrl?: string | undefined;
streamChatUrl?: string | undefined;
}, {
modelName: string;
apiKey: string;
completeChatUrl?: string | undefined;
streamChatUrl?: string | undefined;
}>;
type ClaudeOpus4_7OptionsType = z.infer<typeof ClaudeOpus4_7Options>;
declare class ClaudeOpus4_7 extends BaseChatModel {
constructor(options: ClaudeOpus4_7OptionsType);
}
declare const ClaudeSonnet4_520250929Literal = "claude-sonnet-4-5-20250929";
declare const ClaudeSonnet4_520250929Schema: {
description: string;
name: string;
roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
modalities: ["text" | "image" | "tool-call" | "tool-response" | "reasoning", ...("text" | "image" | "tool-call" | "tool-response" | "reasoning")[]];
maxInputTokens: number;
maxOutputTokens: number;
config: {
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[];
} | {
type: "string";
param: string;
title: string;
description: string;
default?: string | undefined;
minLength?: number | undefined;
maxLength?: number | undefined;
}>;
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
};
price: {
modelName: string;
currency: string;
tokenRanges: {
minTokens: number;
prices: {
base: {
inputPricePerMillion: number;
outputPricePerMillion: number;
};
};
maxTokens?: number | null | undefined;
}[];
};
maxReasoningTokens?: number | undefined;
};
declare const ClaudeSonnet4_520250929Options: z.ZodObject<{
modelName: z.ZodString;
apiKey: z.ZodString;
completeChatUrl: z.ZodOptional<z.ZodString>;
streamChatUrl: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
modelName: string;
apiKey: string;
completeChatUrl?: string | undefined;
streamChatUrl?: string | undefined;
}, {
modelName: string;
apiKey: string;
completeChatUrl?: string | undefined;
streamChatUrl?: string | undefined;
}>;
type ClaudeSonnet4_520250929OptionsType = z.infer<typeof ClaudeSonnet4_520250929Options>;
declare class ClaudeSonnet4_520250929 extends BaseChatModel {
constructor(options: ClaudeSonnet4_520250929OptionsType);
}
declare const ClaudeSonnet4_6Literal = "claude-sonnet-4-6";
declare const ClaudeSonnet4_6Schema: {
description: string;
name: string;
roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
modalities: ["text" | "image" | "tool-call" | "tool-response" | "reasoning", ...("text" | "image" | "tool-call" | "tool-response" | "reasoning")[]];
maxInputTokens: number;
maxOutputTokens: number;
config: {
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[];
} | {
type: "string";
param: string;
title: string;
description: string;
default?: string | undefined;
minLength?: number | undefined;
maxLength?: number | undefined;
}>;
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
};
price: {
modelName: string;
currency: string;
tokenRanges: {
minTokens: number;
prices: {
base: {
inputPricePerMillion: number;
outputPricePerMillion: number;
};
};
maxTokens?: number | null | undefined;
}[];
};
maxReasoningTokens?: number | undefined;
};
declare const ClaudeSonnet4_6Options: z.ZodObject<{
modelName: z.ZodString;
apiKey: z.Zod