UNPKG

@braintrust/proxy

Version:

A proxy server that load balances across AI providers.

814 lines (812 loc) 292 kB
import { z } from 'zod'; import { MessageRole, AnyModelParam, ModelParams, Message } from '@braintrust/core/typespecs'; declare const PromptInputs: readonly ["chat", "completion"]; type PromptInputType = (typeof PromptInputs)[number]; declare const ModelFormats: readonly ["openai", "anthropic", "google", "window", "js", "converse"]; type ModelFormat = (typeof ModelFormats)[number]; declare const ModelEndpointType: readonly ["openai", "anthropic", "google", "mistral", "bedrock", "vertex", "together", "fireworks", "perplexity", "xAI", "groq", "azure", "databricks", "lepton", "cerebras", "ollama", "replicate", "js"]; type ModelEndpointType = (typeof ModelEndpointType)[number]; declare const ModelSchema: z.ZodObject<{ format: z.ZodEnum<["openai", "anthropic", "google", "window", "js", "converse"]>; flavor: z.ZodEnum<["chat", "completion"]>; multimodal: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; input_cost_per_token: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; output_cost_per_token: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; input_cost_per_mil_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; output_cost_per_mil_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; input_cache_read_cost_per_mil_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; input_cache_write_cost_per_mil_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>; o1_like: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; reasoning: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; reasoning_budget: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; experimental: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; deprecated: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; parent: z.ZodOptional<z.ZodNullable<z.ZodString>>; endpoint_types: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["openai", "anthropic", "google", "mistral", "bedrock", "vertex", "together", "fireworks", "perplexity", "xAI", "groq", "azure", "databricks", "lepton", "cerebras", "ollama", "replicate", "js"]>, "many">>>; locations: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>; description: z.ZodOptional<z.ZodNullable<z.ZodString>>; max_input_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; max_output_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; }, "strip", z.ZodTypeAny, { format: "openai" | "anthropic" | "google" | "window" | "js" | "converse"; flavor: "chat" | "completion"; multimodal?: boolean | null | undefined; input_cost_per_token?: number | null | undefined; output_cost_per_token?: number | null | undefined; input_cost_per_mil_tokens?: number | null | undefined; output_cost_per_mil_tokens?: number | null | undefined; input_cache_read_cost_per_mil_tokens?: number | null | undefined; input_cache_write_cost_per_mil_tokens?: number | null | undefined; displayName?: string | null | undefined; o1_like?: boolean | null | undefined; reasoning?: boolean | null | undefined; reasoning_budget?: boolean | null | undefined; experimental?: boolean | null | undefined; deprecated?: boolean | null | undefined; parent?: string | null | undefined; endpoint_types?: ("openai" | "anthropic" | "google" | "js" | "mistral" | "bedrock" | "vertex" | "together" | "fireworks" | "perplexity" | "xAI" | "groq" | "azure" | "databricks" | "lepton" | "cerebras" | "ollama" | "replicate")[] | null | undefined; locations?: string[] | null | undefined; description?: string | null | undefined; max_input_tokens?: number | null | undefined; max_output_tokens?: number | null | undefined; }, { format: "openai" | "anthropic" | "google" | "window" | "js" | "converse"; flavor: "chat" | "completion"; multimodal?: boolean | null | undefined; input_cost_per_token?: number | null | undefined; output_cost_per_token?: number | null | undefined; input_cost_per_mil_tokens?: number | null | undefined; output_cost_per_mil_tokens?: number | null | undefined; input_cache_read_cost_per_mil_tokens?: number | null | undefined; input_cache_write_cost_per_mil_tokens?: number | null | undefined; displayName?: string | null | undefined; o1_like?: boolean | null | undefined; reasoning?: boolean | null | undefined; reasoning_budget?: boolean | null | undefined; experimental?: boolean | null | undefined; deprecated?: boolean | null | undefined; parent?: string | null | undefined; endpoint_types?: ("openai" | "anthropic" | "google" | "js" | "mistral" | "bedrock" | "vertex" | "together" | "fireworks" | "perplexity" | "xAI" | "groq" | "azure" | "databricks" | "lepton" | "cerebras" | "ollama" | "replicate")[] | null | undefined; locations?: string[] | null | undefined; description?: string | null | undefined; max_input_tokens?: number | null | undefined; max_output_tokens?: number | null | undefined; }>; type ModelSpec = z.infer<typeof ModelSchema>; declare const AvailableModels: { [name: string]: ModelSpec; }; declare const BaseMetadataSchema: z.ZodObject<{ models: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>; customModels: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{ format: z.ZodEnum<["openai", "anthropic", "google", "window", "js", "converse"]>; flavor: z.ZodEnum<["chat", "completion"]>; multimodal: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; input_cost_per_token: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; output_cost_per_token: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; input_cost_per_mil_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; output_cost_per_mil_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; input_cache_read_cost_per_mil_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; input_cache_write_cost_per_mil_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>; o1_like: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; reasoning: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; reasoning_budget: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; experimental: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; deprecated: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; parent: z.ZodOptional<z.ZodNullable<z.ZodString>>; endpoint_types: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["openai", "anthropic", "google", "mistral", "bedrock", "vertex", "together", "fireworks", "perplexity", "xAI", "groq", "azure", "databricks", "lepton", "cerebras", "ollama", "replicate", "js"]>, "many">>>; locations: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>; description: z.ZodOptional<z.ZodNullable<z.ZodString>>; max_input_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; max_output_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; }, "strip", z.ZodTypeAny, { format: "openai" | "anthropic" | "google" | "window" | "js" | "converse"; flavor: "chat" | "completion"; multimodal?: boolean | null | undefined; input_cost_per_token?: number | null | undefined; output_cost_per_token?: number | null | undefined; input_cost_per_mil_tokens?: number | null | undefined; output_cost_per_mil_tokens?: number | null | undefined; input_cache_read_cost_per_mil_tokens?: number | null | undefined; input_cache_write_cost_per_mil_tokens?: number | null | undefined; displayName?: string | null | undefined; o1_like?: boolean | null | undefined; reasoning?: boolean | null | undefined; reasoning_budget?: boolean | null | undefined; experimental?: boolean | null | undefined; deprecated?: boolean | null | undefined; parent?: string | null | undefined; endpoint_types?: ("openai" | "anthropic" | "google" | "js" | "mistral" | "bedrock" | "vertex" | "together" | "fireworks" | "perplexity" | "xAI" | "groq" | "azure" | "databricks" | "lepton" | "cerebras" | "ollama" | "replicate")[] | null | undefined; locations?: string[] | null | undefined; description?: string | null | undefined; max_input_tokens?: number | null | undefined; max_output_tokens?: number | null | undefined; }, { format: "openai" | "anthropic" | "google" | "window" | "js" | "converse"; flavor: "chat" | "completion"; multimodal?: boolean | null | undefined; input_cost_per_token?: number | null | undefined; output_cost_per_token?: number | null | undefined; input_cost_per_mil_tokens?: number | null | undefined; output_cost_per_mil_tokens?: number | null | undefined; input_cache_read_cost_per_mil_tokens?: number | null | undefined; input_cache_write_cost_per_mil_tokens?: number | null | undefined; displayName?: string | null | undefined; o1_like?: boolean | null | undefined; reasoning?: boolean | null | undefined; reasoning_budget?: boolean | null | undefined; experimental?: boolean | null | undefined; deprecated?: boolean | null | undefined; parent?: string | null | undefined; endpoint_types?: ("openai" | "anthropic" | "google" | "js" | "mistral" | "bedrock" | "vertex" | "together" | "fireworks" | "perplexity" | "xAI" | "groq" | "azure" | "databricks" | "lepton" | "cerebras" | "ollama" | "replicate")[] | null | undefined; locations?: string[] | null | undefined; description?: string | null | undefined; max_input_tokens?: number | null | undefined; max_output_tokens?: number | null | undefined; }>>>>; excludeDefaultModels: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; additionalHeaders: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>; supportsStreaming: z.ZodDefault<z.ZodBoolean>; }, "strict", z.ZodTypeAny, { supportsStreaming: boolean; models?: string[] | null | undefined; customModels?: Record<string, { format: "openai" | "anthropic" | "google" | "window" | "js" | "converse"; flavor: "chat" | "completion"; multimodal?: boolean | null | undefined; input_cost_per_token?: number | null | undefined; output_cost_per_token?: number | null | undefined; input_cost_per_mil_tokens?: number | null | undefined; output_cost_per_mil_tokens?: number | null | undefined; input_cache_read_cost_per_mil_tokens?: number | null | undefined; input_cache_write_cost_per_mil_tokens?: number | null | undefined; displayName?: string | null | undefined; o1_like?: boolean | null | undefined; reasoning?: boolean | null | undefined; reasoning_budget?: boolean | null | undefined; experimental?: boolean | null | undefined; deprecated?: boolean | null | undefined; parent?: string | null | undefined; endpoint_types?: ("openai" | "anthropic" | "google" | "js" | "mistral" | "bedrock" | "vertex" | "together" | "fireworks" | "perplexity" | "xAI" | "groq" | "azure" | "databricks" | "lepton" | "cerebras" | "ollama" | "replicate")[] | null | undefined; locations?: string[] | null | undefined; description?: string | null | undefined; max_input_tokens?: number | null | undefined; max_output_tokens?: number | null | undefined; }> | null | undefined; excludeDefaultModels?: boolean | null | undefined; additionalHeaders?: Record<string, string> | null | undefined; }, { models?: string[] | null | undefined; customModels?: Record<string, { format: "openai" | "anthropic" | "google" | "window" | "js" | "converse"; flavor: "chat" | "completion"; multimodal?: boolean | null | undefined; input_cost_per_token?: number | null | undefined; output_cost_per_token?: number | null | undefined; input_cost_per_mil_tokens?: number | null | undefined; output_cost_per_mil_tokens?: number | null | undefined; input_cache_read_cost_per_mil_tokens?: number | null | undefined; input_cache_write_cost_per_mil_tokens?: number | null | undefined; displayName?: string | null | undefined; o1_like?: boolean | null | undefined; reasoning?: boolean | null | undefined; reasoning_budget?: boolean | null | undefined; experimental?: boolean | null | undefined; deprecated?: boolean | null | undefined; parent?: string | null | undefined; endpoint_types?: ("openai" | "anthropic" | "google" | "js" | "mistral" | "bedrock" | "vertex" | "together" | "fireworks" | "perplexity" | "xAI" | "groq" | "azure" | "databricks" | "lepton" | "cerebras" | "ollama" | "replicate")[] | null | undefined; locations?: string[] | null | undefined; description?: string | null | undefined; max_input_tokens?: number | null | undefined; max_output_tokens?: number | null | undefined; }> | null | undefined; excludeDefaultModels?: boolean | null | undefined; additionalHeaders?: Record<string, string> | null | undefined; supportsStreaming?: boolean | undefined; }>; declare const AzureMetadataSchema: z.ZodObject<{ models: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>; customModels: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{ format: z.ZodEnum<["openai", "anthropic", "google", "window", "js", "converse"]>; flavor: z.ZodEnum<["chat", "completion"]>; multimodal: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; input_cost_per_token: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; output_cost_per_token: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; input_cost_per_mil_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; output_cost_per_mil_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; input_cache_read_cost_per_mil_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; input_cache_write_cost_per_mil_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>; o1_like: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; reasoning: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; reasoning_budget: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; experimental: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; deprecated: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; parent: z.ZodOptional<z.ZodNullable<z.ZodString>>; endpoint_types: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["openai", "anthropic", "google", "mistral", "bedrock", "vertex", "together", "fireworks", "perplexity", "xAI", "groq", "azure", "databricks", "lepton", "cerebras", "ollama", "replicate", "js"]>, "many">>>; locations: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>; description: z.ZodOptional<z.ZodNullable<z.ZodString>>; max_input_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; max_output_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; }, "strip", z.ZodTypeAny, { format: "openai" | "anthropic" | "google" | "window" | "js" | "converse"; flavor: "chat" | "completion"; multimodal?: boolean | null | undefined; input_cost_per_token?: number | null | undefined; output_cost_per_token?: number | null | undefined; input_cost_per_mil_tokens?: number | null | undefined; output_cost_per_mil_tokens?: number | null | undefined; input_cache_read_cost_per_mil_tokens?: number | null | undefined; input_cache_write_cost_per_mil_tokens?: number | null | undefined; displayName?: string | null | undefined; o1_like?: boolean | null | undefined; reasoning?: boolean | null | undefined; reasoning_budget?: boolean | null | undefined; experimental?: boolean | null | undefined; deprecated?: boolean | null | undefined; parent?: string | null | undefined; endpoint_types?: ("openai" | "anthropic" | "google" | "js" | "mistral" | "bedrock" | "vertex" | "together" | "fireworks" | "perplexity" | "xAI" | "groq" | "azure" | "databricks" | "lepton" | "cerebras" | "ollama" | "replicate")[] | null | undefined; locations?: string[] | null | undefined; description?: string | null | undefined; max_input_tokens?: number | null | undefined; max_output_tokens?: number | null | undefined; }, { format: "openai" | "anthropic" | "google" | "window" | "js" | "converse"; flavor: "chat" | "completion"; multimodal?: boolean | null | undefined; input_cost_per_token?: number | null | undefined; output_cost_per_token?: number | null | undefined; input_cost_per_mil_tokens?: number | null | undefined; output_cost_per_mil_tokens?: number | null | undefined; input_cache_read_cost_per_mil_tokens?: number | null | undefined; input_cache_write_cost_per_mil_tokens?: number | null | undefined; displayName?: string | null | undefined; o1_like?: boolean | null | undefined; reasoning?: boolean | null | undefined; reasoning_budget?: boolean | null | undefined; experimental?: boolean | null | undefined; deprecated?: boolean | null | undefined; parent?: string | null | undefined; endpoint_types?: ("openai" | "anthropic" | "google" | "js" | "mistral" | "bedrock" | "vertex" | "together" | "fireworks" | "perplexity" | "xAI" | "groq" | "azure" | "databricks" | "lepton" | "cerebras" | "ollama" | "replicate")[] | null | undefined; locations?: string[] | null | undefined; description?: string | null | undefined; max_input_tokens?: number | null | undefined; max_output_tokens?: number | null | undefined; }>>>>; excludeDefaultModels: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; additionalHeaders: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>; supportsStreaming: z.ZodDefault<z.ZodBoolean>; api_base: z.ZodString; api_version: z.ZodDefault<z.ZodString>; deployment: z.ZodOptional<z.ZodNullable<z.ZodString>>; auth_type: z.ZodDefault<z.ZodEnum<["api_key", "entra_api"]>>; no_named_deployment: z.ZodDefault<z.ZodBoolean>; }, "strict", z.ZodTypeAny, { supportsStreaming: boolean; api_base: string; api_version: string; auth_type: "api_key" | "entra_api"; no_named_deployment: boolean; models?: string[] | null | undefined; customModels?: Record<string, { format: "openai" | "anthropic" | "google" | "window" | "js" | "converse"; flavor: "chat" | "completion"; multimodal?: boolean | null | undefined; input_cost_per_token?: number | null | undefined; output_cost_per_token?: number | null | undefined; input_cost_per_mil_tokens?: number | null | undefined; output_cost_per_mil_tokens?: number | null | undefined; input_cache_read_cost_per_mil_tokens?: number | null | undefined; input_cache_write_cost_per_mil_tokens?: number | null | undefined; displayName?: string | null | undefined; o1_like?: boolean | null | undefined; reasoning?: boolean | null | undefined; reasoning_budget?: boolean | null | undefined; experimental?: boolean | null | undefined; deprecated?: boolean | null | undefined; parent?: string | null | undefined; endpoint_types?: ("openai" | "anthropic" | "google" | "js" | "mistral" | "bedrock" | "vertex" | "together" | "fireworks" | "perplexity" | "xAI" | "groq" | "azure" | "databricks" | "lepton" | "cerebras" | "ollama" | "replicate")[] | null | undefined; locations?: string[] | null | undefined; description?: string | null | undefined; max_input_tokens?: number | null | undefined; max_output_tokens?: number | null | undefined; }> | null | undefined; excludeDefaultModels?: boolean | null | undefined; additionalHeaders?: Record<string, string> | null | undefined; deployment?: string | null | undefined; }, { api_base: string; models?: string[] | null | undefined; customModels?: Record<string, { format: "openai" | "anthropic" | "google" | "window" | "js" | "converse"; flavor: "chat" | "completion"; multimodal?: boolean | null | undefined; input_cost_per_token?: number | null | undefined; output_cost_per_token?: number | null | undefined; input_cost_per_mil_tokens?: number | null | undefined; output_cost_per_mil_tokens?: number | null | undefined; input_cache_read_cost_per_mil_tokens?: number | null | undefined; input_cache_write_cost_per_mil_tokens?: number | null | undefined; displayName?: string | null | undefined; o1_like?: boolean | null | undefined; reasoning?: boolean | null | undefined; reasoning_budget?: boolean | null | undefined; experimental?: boolean | null | undefined; deprecated?: boolean | null | undefined; parent?: string | null | undefined; endpoint_types?: ("openai" | "anthropic" | "google" | "js" | "mistral" | "bedrock" | "vertex" | "together" | "fireworks" | "perplexity" | "xAI" | "groq" | "azure" | "databricks" | "lepton" | "cerebras" | "ollama" | "replicate")[] | null | undefined; locations?: string[] | null | undefined; description?: string | null | undefined; max_input_tokens?: number | null | undefined; max_output_tokens?: number | null | undefined; }> | null | undefined; excludeDefaultModels?: boolean | null | undefined; additionalHeaders?: Record<string, string> | null | undefined; supportsStreaming?: boolean | undefined; api_version?: string | undefined; deployment?: string | null | undefined; auth_type?: "api_key" | "entra_api" | undefined; no_named_deployment?: boolean | undefined; }>; declare const AzureEntraSecretSchema: z.ZodObject<{ client_id: z.ZodString; client_secret: z.ZodString; tenant_id: z.ZodString; scope: z.ZodString; }, "strip", z.ZodTypeAny, { client_id: string; client_secret: string; tenant_id: string; scope: string; }, { client_id: string; client_secret: string; tenant_id: string; scope: string; }>; type AzureEntraSecret = z.infer<typeof AzureEntraSecretSchema>; declare const BedrockMetadataSchema: z.ZodObject<{ models: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>; customModels: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{ format: z.ZodEnum<["openai", "anthropic", "google", "window", "js", "converse"]>; flavor: z.ZodEnum<["chat", "completion"]>; multimodal: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; input_cost_per_token: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; output_cost_per_token: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; input_cost_per_mil_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; output_cost_per_mil_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; input_cache_read_cost_per_mil_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; input_cache_write_cost_per_mil_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>; o1_like: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; reasoning: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; reasoning_budget: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; experimental: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; deprecated: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; parent: z.ZodOptional<z.ZodNullable<z.ZodString>>; endpoint_types: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["openai", "anthropic", "google", "mistral", "bedrock", "vertex", "together", "fireworks", "perplexity", "xAI", "groq", "azure", "databricks", "lepton", "cerebras", "ollama", "replicate", "js"]>, "many">>>; locations: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>; description: z.ZodOptional<z.ZodNullable<z.ZodString>>; max_input_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; max_output_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; }, "strip", z.ZodTypeAny, { format: "openai" | "anthropic" | "google" | "window" | "js" | "converse"; flavor: "chat" | "completion"; multimodal?: boolean | null | undefined; input_cost_per_token?: number | null | undefined; output_cost_per_token?: number | null | undefined; input_cost_per_mil_tokens?: number | null | undefined; output_cost_per_mil_tokens?: number | null | undefined; input_cache_read_cost_per_mil_tokens?: number | null | undefined; input_cache_write_cost_per_mil_tokens?: number | null | undefined; displayName?: string | null | undefined; o1_like?: boolean | null | undefined; reasoning?: boolean | null | undefined; reasoning_budget?: boolean | null | undefined; experimental?: boolean | null | undefined; deprecated?: boolean | null | undefined; parent?: string | null | undefined; endpoint_types?: ("openai" | "anthropic" | "google" | "js" | "mistral" | "bedrock" | "vertex" | "together" | "fireworks" | "perplexity" | "xAI" | "groq" | "azure" | "databricks" | "lepton" | "cerebras" | "ollama" | "replicate")[] | null | undefined; locations?: string[] | null | undefined; description?: string | null | undefined; max_input_tokens?: number | null | undefined; max_output_tokens?: number | null | undefined; }, { format: "openai" | "anthropic" | "google" | "window" | "js" | "converse"; flavor: "chat" | "completion"; multimodal?: boolean | null | undefined; input_cost_per_token?: number | null | undefined; output_cost_per_token?: number | null | undefined; input_cost_per_mil_tokens?: number | null | undefined; output_cost_per_mil_tokens?: number | null | undefined; input_cache_read_cost_per_mil_tokens?: number | null | undefined; input_cache_write_cost_per_mil_tokens?: number | null | undefined; displayName?: string | null | undefined; o1_like?: boolean | null | undefined; reasoning?: boolean | null | undefined; reasoning_budget?: boolean | null | undefined; experimental?: boolean | null | undefined; deprecated?: boolean | null | undefined; parent?: string | null | undefined; endpoint_types?: ("openai" | "anthropic" | "google" | "js" | "mistral" | "bedrock" | "vertex" | "together" | "fireworks" | "perplexity" | "xAI" | "groq" | "azure" | "databricks" | "lepton" | "cerebras" | "ollama" | "replicate")[] | null | undefined; locations?: string[] | null | undefined; description?: string | null | undefined; max_input_tokens?: number | null | undefined; max_output_tokens?: number | null | undefined; }>>>>; excludeDefaultModels: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; additionalHeaders: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>; supportsStreaming: z.ZodDefault<z.ZodBoolean>; region: z.ZodString; access_key: z.ZodString; session_token: z.ZodOptional<z.ZodNullable<z.ZodString>>; }, "strict", z.ZodTypeAny, { supportsStreaming: boolean; region: string; access_key: string; models?: string[] | null | undefined; customModels?: Record<string, { format: "openai" | "anthropic" | "google" | "window" | "js" | "converse"; flavor: "chat" | "completion"; multimodal?: boolean | null | undefined; input_cost_per_token?: number | null | undefined; output_cost_per_token?: number | null | undefined; input_cost_per_mil_tokens?: number | null | undefined; output_cost_per_mil_tokens?: number | null | undefined; input_cache_read_cost_per_mil_tokens?: number | null | undefined; input_cache_write_cost_per_mil_tokens?: number | null | undefined; displayName?: string | null | undefined; o1_like?: boolean | null | undefined; reasoning?: boolean | null | undefined; reasoning_budget?: boolean | null | undefined; experimental?: boolean | null | undefined; deprecated?: boolean | null | undefined; parent?: string | null | undefined; endpoint_types?: ("openai" | "anthropic" | "google" | "js" | "mistral" | "bedrock" | "vertex" | "together" | "fireworks" | "perplexity" | "xAI" | "groq" | "azure" | "databricks" | "lepton" | "cerebras" | "ollama" | "replicate")[] | null | undefined; locations?: string[] | null | undefined; description?: string | null | undefined; max_input_tokens?: number | null | undefined; max_output_tokens?: number | null | undefined; }> | null | undefined; excludeDefaultModels?: boolean | null | undefined; additionalHeaders?: Record<string, string> | null | undefined; session_token?: string | null | undefined; }, { region: string; access_key: string; models?: string[] | null | undefined; customModels?: Record<string, { format: "openai" | "anthropic" | "google" | "window" | "js" | "converse"; flavor: "chat" | "completion"; multimodal?: boolean | null | undefined; input_cost_per_token?: number | null | undefined; output_cost_per_token?: number | null | undefined; input_cost_per_mil_tokens?: number | null | undefined; output_cost_per_mil_tokens?: number | null | undefined; input_cache_read_cost_per_mil_tokens?: number | null | undefined; input_cache_write_cost_per_mil_tokens?: number | null | undefined; displayName?: string | null | undefined; o1_like?: boolean | null | undefined; reasoning?: boolean | null | undefined; reasoning_budget?: boolean | null | undefined; experimental?: boolean | null | undefined; deprecated?: boolean | null | undefined; parent?: string | null | undefined; endpoint_types?: ("openai" | "anthropic" | "google" | "js" | "mistral" | "bedrock" | "vertex" | "together" | "fireworks" | "perplexity" | "xAI" | "groq" | "azure" | "databricks" | "lepton" | "cerebras" | "ollama" | "replicate")[] | null | undefined; locations?: string[] | null | undefined; description?: string | null | undefined; max_input_tokens?: number | null | undefined; max_output_tokens?: number | null | undefined; }> | null | undefined; excludeDefaultModels?: boolean | null | undefined; additionalHeaders?: Record<string, string> | null | undefined; supportsStreaming?: boolean | undefined; session_token?: string | null | undefined; }>; type BedrockMetadata = z.infer<typeof BedrockMetadataSchema>; declare const VertexMetadataSchema: z.ZodObject<{ models: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>; customModels: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{ format: z.ZodEnum<["openai", "anthropic", "google", "window", "js", "converse"]>; flavor: z.ZodEnum<["chat", "completion"]>; multimodal: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; input_cost_per_token: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; output_cost_per_token: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; input_cost_per_mil_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; output_cost_per_mil_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; input_cache_read_cost_per_mil_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; input_cache_write_cost_per_mil_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>; o1_like: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; reasoning: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; reasoning_budget: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; experimental: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; deprecated: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; parent: z.ZodOptional<z.ZodNullable<z.ZodString>>; endpoint_types: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["openai", "anthropic", "google", "mistral", "bedrock", "vertex", "together", "fireworks", "perplexity", "xAI", "groq", "azure", "databricks", "lepton", "cerebras", "ollama", "replicate", "js"]>, "many">>>; locations: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>; description: z.ZodOptional<z.ZodNullable<z.ZodString>>; max_input_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; max_output_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; }, "strip", z.ZodTypeAny, { format: "openai" | "anthropic" | "google" | "window" | "js" | "converse"; flavor: "chat" | "completion"; multimodal?: boolean | null | undefined; input_cost_per_token?: number | null | undefined; output_cost_per_token?: number | null | undefined; input_cost_per_mil_tokens?: number | null | undefined; output_cost_per_mil_tokens?: number | null | undefined; input_cache_read_cost_per_mil_tokens?: number | null | undefined; input_cache_write_cost_per_mil_tokens?: number | null | undefined; displayName?: string | null | undefined; o1_like?: boolean | null | undefined; reasoning?: boolean | null | undefined; reasoning_budget?: boolean | null | undefined; experimental?: boolean | null | undefined; deprecated?: boolean | null | undefined; parent?: string | null | undefined; endpoint_types?: ("openai" | "anthropic" | "google" | "js" | "mistral" | "bedrock" | "vertex" | "together" | "fireworks" | "perplexity" | "xAI" | "groq" | "azure" | "databricks" | "lepton" | "cerebras" | "ollama" | "replicate")[] | null | undefined; locations?: string[] | null | undefined; description?: string | null | undefined; max_input_tokens?: number | null | undefined; max_output_tokens?: number | null | undefined; }, { format: "openai" | "anthropic" | "google" | "window" | "js" | "converse"; flavor: "chat" | "completion"; multimodal?: boolean | null | undefined; input_cost_per_token?: number | null | undefined; output_cost_per_token?: number | null | undefined; input_cost_per_mil_tokens?: number | null | undefined; output_cost_per_mil_tokens?: number | null | undefined; input_cache_read_cost_per_mil_tokens?: number | null | undefined; input_cache_write_cost_per_mil_tokens?: number | null | undefined; displayName?: string | null | undefined; o1_like?: boolean | null | undefined; reasoning?: boolean | null | undefined; reasoning_budget?: boolean | null | undefined; experimental?: boolean | null | undefined; deprecated?: boolean | null | undefined; parent?: string | null | undefined; endpoint_types?: ("openai" | "anthropic" | "google" | "js" | "mistral" | "bedrock" | "vertex" | "together" | "fireworks" | "perplexity" | "xAI" | "groq" | "azure" | "databricks" | "lepton" | "cerebras" | "ollama" | "replicate")[] | null | undefined; locations?: string[] | null | undefined; description?: string | null | undefined; max_input_tokens?: number | null | undefined; max_output_tokens?: number | null | undefined; }>>>>; excludeDefaultModels: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; additionalHeaders: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>; supportsStreaming: z.ZodDefault<z.ZodBoolean>; project: z.ZodString; authType: z.ZodEnum<["access_token", "service_account_key"]>; api_base: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString]>>>; }, "strict", z.ZodTypeAny, { supportsStreaming: boolean; project: string; authType: "access_token" | "service_account_key"; models?: string[] | null | undefined; customModels?: Record<string, { format: "openai" | "anthropic" | "google" | "window" | "js" | "converse"; flavor: "chat" | "completion"; multimodal?: boolean | null | undefined; input_cost_per_token?: number | null | undefined; output_cost_per_token?: number | null | undefined; input_cost_per_mil_tokens?: number | null | undefined; output_cost_per_mil_tokens?: number | null | undefined; input_cache_read_cost_per_mil_tokens?: number | null | undefined; input_cache_write_cost_per_mil_tokens?: number | null | undefined; displayName?: string | null | undefined; o1_like?: boolean | null | undefined; reasoning?: boolean | null | undefined; reasoning_budget?: boolean | null | undefined; experimental?: boolean | null | undefined; deprecated?: boolean | null | undefined; parent?: string | null | undefined; endpoint_types?: ("openai" | "anthropic" | "google" | "js" | "mistral" | "bedrock" | "vertex" | "together" | "fireworks" | "perplexity" | "xAI" | "groq" | "azure" | "databricks" | "lepton" | "cerebras" | "ollama" | "replicate")[] | null | undefined; locations?: string[] | null | undefined; description?: string | null | undefined; max_input_tokens?: number | null | undefined; max_output_tokens?: number | null | undefined; }> | null | undefined; excludeDefaultModels?: boolean | null | undefined; additionalHeaders?: Record<string, string> | null | undefined; api_base?: string | null | undefined; }, { project: string; authType: "access_token" | "service_account_key"; models?: string[] | null | undefined; customModels?: Record<string, { format: "openai" | "anthropic" | "google" | "window" | "js" | "converse"; flavor: "chat" | "completion"; multimodal?: boolean | null | undefined; input_cost_per_token?: number | null | undefined; output_cost_per_token?: number | null | undefined; input_cost_per_mil_tokens?: number | null | undefined; output_cost_per_mil_tokens?: number | null | undefined; input_cache_read_cost_per_mil_tokens?: number | null | undefined; input_cache_write_cost_per_mil_tokens?: number | null | undefined; displayName?: string | null | undefined; o1_like?: boolean | null | undefined; reasoning?: boolean | null | undefined; reasoning_budget?: boolean | null | undefined; experimental?: boolean | null | undefined; deprecated?: boolean | null | undefined; parent?: string | null | undefined; endpoint_types?: ("openai" | "anthropic" | "google" | "js" | "mistral" | "bedrock" | "vertex" | "together" | "fireworks" | "perplexity" | "xAI" | "groq" | "azure" | "databricks" | "lepton" | "cerebras" | "ollama" | "replicate")[] | null | undefined; locations?: string[] | null | undefined; description?: string | null | undefined; max_input_tokens?: number | null | undefined; max_output_tokens?: number | null | undefined; }> | null | undefined; excludeDefaultModels?: boolean | null | undefined; additionalHeaders?: Record<string, string> | null | undefined; supportsStreaming?: boolean | undefined; api_base?: string | null | undefined; }>; declare const DatabricksMetadataSchema: z.ZodObject<{ models: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>; customModels: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{ format: z.ZodEnum<["openai", "anthropic", "google", "window", "js", "converse"]>; flavor: z.ZodEnum<["chat", "completion"]>; multimodal: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; input_cost_per_token: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; output_cost_per_token: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; input_cost_per_mil_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; output_cost_per_mil_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; input_cache_read_cost_per_mil_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; input_cache_write_cost_per_mil_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>; o1_like: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; reasoning: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; reasoning_budget: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; experimental: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; deprecated: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; parent: z.ZodOptional<z.ZodNullable<z.ZodString>>; endpoint_types: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["openai", "anthropic", "google", "mistral", "bedrock", "vertex", "together", "fireworks", "perplexity", "xAI", "groq", "azure", "databricks", "lepton", "cerebras", "ollama", "replicate", "js"]>, "many">>>; locations: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>; description: z.ZodOptional<z.ZodNullable<z.ZodString>>; max_input_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; max_output_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; }, "strip", z.ZodTypeAny, { format: "openai" | "anthropic" | "google" | "window" | "js" | "converse"; flavor: "chat" | "completion"; multimodal?: boolean | null | undefined; input_cost_per_token?: number | null | undefined; output_cost_per_token?: number | null | undefined; input_cost_per_mil_tokens?: number | null | undefined; output_cost_per_mil_tokens?: number | null | undefined; input_cache_read_cost_per_mil_tokens?: number | null | undefined; input_cache_write_cost_per_mil_tokens?: number | null | undefined; displayName?: string | null | undefined; o1_like?: boolean | null | undefined; reasoning?: boolean | null | undefined; reasoning_budget?: boolean | null | undefined; experimental?: boolean | null | undefined; deprecated?: boolean | null | undefined; parent?: string | null | undefined; endpoint_types?: ("openai" | "anthropic" | "google" | "js" | "mistral" | "bedrock" | "vertex" | "together" | "fireworks" | "perplexity" | "xAI" | "groq" | "azure" | "databricks" | "lepton" | "cerebras" | "ollama" | "replicate")[] | null | undefined; locations?: string[] | null | undefined; description?: string | null | undefined; max_input_tokens?: number | null | undefined; max_output_tokens?: number | null | undefined; }, { format: "openai" | "anthropic" | "google" | "window" | "js" | "converse"; flavor: "chat" | "completion"; multimodal?: boolean | null | undefined; input_cost_per_token?: number | null | undefined; output_cost_per_token?: number | null | undefined; input_cost_per_mil_tokens?: number | null | undefined; output_cost_per_mil_tokens?: number | null | undefined; input_cache_read_cost_per_mil_tokens?: number | null | undefined; input_cache_write_cost_per_mil_tokens?: number | null | undefined; displayName?: string | null | undefined; o1_like?: boolean | null | undefined; reasoning?: boolean | null | undefined; reasoning_budget?: boolean | null | undefined; experimental?: boolean | null | undefined; deprecated?: boolean | null | undefined; parent?: string | null | undefined; endpoint_types?: ("openai" | "anthropic" | "google" | "js" | "mistral" | "bedrock" | "vertex" | "together" | "fireworks" | "perplexity" | "xAI" | "groq" | "azure" | "databricks" | "lepton" | "cerebras" | "ollama" | "replicate")[] | null | undefined; locations?: string[] | null | undefined; description?: string | null | undefined; max_input_tokens?: number | null | undefined; max_output_tokens?: number | null | undefined; }>>>>; excludeDefaultModels: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; additionalHeaders: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>; supportsStreaming: z.ZodDefault<z.ZodBoolean>; api_base: z.ZodString; auth_type: z.ZodDefault<z.ZodEnum<["pat", "service_principal_oauth"]>>; }, "strict", z.ZodTypeAny, { supportsStreaming: boolean; api_base: string; auth_type: "pat" | "service_principal_oauth"; models?: string[] | null | undefined; customModels?: Record<string, { format: "openai" | "anthropic" | "google" | "window" | "js" | "converse"; flavor: "chat" | "completion"; multimodal?: boolean | null | undefined; input_cost_per_token?: number | null | undefined; output_cost_per_token?: number | null | undefined; input_cost_per_mil_tokens?: number | null | undefined; output_cost_per_mil_tokens?: number | null | undefined; input_cache_read_cost_per_mil_tokens?: number | null | undefined; input_cache_write_cost_per_mil_tokens?: number | null | undefined; displayName?: string | null | undefined; o1_like?: boolean | null | undefined; reasoning?: boolean | null | undefined; reasoning_budget?: boolean | null | undefined; experimental?: boolean | null | undefined; deprecated?: boolean | null | undefined; parent?: string | null | undefined; endpoint_types?: ("openai" | "anthropic" | "google" | "js" | "mistral" | "bedrock" | "vertex" | "together" | "fireworks" | "perplexity" | "xAI" | "groq" | "azure" | "databricks" | "lepton" | "cerebras" | "ollama" | "replicate")[] | null | undefined; locations?: string[] | null | undefined; description?: string | null | undefined; max_input_tokens?: number | null | undefined; max_output_tokens?: number | null | undefined; }> | null | undefined; excludeDefaultModels?: boolean | null | undefined; additionalHeaders?: Record<string, string> | null | undefined; }, { api_base: string; models?: string[] | null | undefined; customModels?: Record<string, { format: "openai" | "anthropic" | "google" | "window" | "js" | "converse"; flavor: "chat" | "completion"; multimodal?: boolean | null | undefined; input_cost_per_token?: number | null | undefined; output_cost_per_token?: number | null | undefined; input_cost_per_mil_tokens?: number | null | undefined; output_cost_per_mil_tokens?: number | null | undefined; input_cache_read_cost_per_mil_tokens?: number | null | undefined; input_cache_write_cost_per_mil_tokens?: number | null | undefined; displayName?: string | null | undefined; o1_like?: boolean | null | undefined; reasoning?: boolean | null | undefined; reasoning_budget?: boolean | null | undefined; experimental?: boolean | null | undefined; deprecated?: boolean | null | undefined; parent?: string | null | undefined; endpoint_types?: ("openai" | "anthropic" | "google" | "js" | "mistral" | "bedrock" | "vertex" | "together" | "fireworks" | "perplexity" | "xAI" | "groq" | "azure" | "databricks" | "lepton" | "cerebras" | "ollama" | "replicate")[] | null | undefined; locations?: string[] | null | undefined; description?: string | null | undefined; max_input_tokens?: number | null | undefined; max_output_tokens?: number | null | undefined; }> | null | undefined; excludeDefaultModels?: boolean | null | undefined; additionalHeaders?: Record<string, string> | null | undefined; supportsStreaming?: boolean | undefined; auth_type?: "pat" | "service_principal_oauth" | undefined; }>; declare const DatabricksOAuthSecretSchema: z.ZodObject<{ client_id: z.ZodString; client_secret: z.ZodString; }, "strip", z.ZodTypeAny, { client_id: string; client_secret: string; }, { client_id: string; client_secret: string; }>; type DatabricksOAuthSecret = z.infer<typeof DatabricksOAuthSecretSchema>; declare const OpenAIMetadataSchema: z.ZodObject<{ models: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>; customModels: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{ format: z.ZodEnum<["openai", "anthropic", "google", "window", "js", "converse"]>; flavor: z.ZodEnum<["chat", "completion"]>; multimodal: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; input_cost_per_token: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; output_cost_per_token: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; input_cost_per_mil_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; output_cost_per_mil_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; input_cache_read_cost_per_mil_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; input_cache_write_cost_per_mil_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>; o1_like: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; reasoning: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; reasoning_budget: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; experimental: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; deprecated: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; parent: z.ZodOptional<z.ZodNullable<z.ZodString>>; endpoint_types: z.ZodOptional<z.ZodN