/** * ArkType schemas for the Anthropic Messages API request shape we accept on the * gateway. Maps canonical wire variants to our internal normalized omp Context * and options. */ import type { ContentBlockParam, ImageBlockParam, MessageCreateParams, MessageParam, TextBlockParam, Tool, ToolChoice } from "./anthropic-wire"; export declare const cacheControlSchema: import("arktype/internal/variants/object.ts").ObjectType<{ type: "ephemeral"; ttl?: "1h" | "5m" | undefined; }, {}>; export declare const base64ImageSourceSchema: import("arktype/internal/variants/object.ts").ObjectType<{ type: "base64"; data: string; media_type: string; }, {}>; export declare const urlImageSourceSchema: import("arktype/internal/variants/object.ts").ObjectType<{ type: "url"; url: string; }, {}>; export declare const fileImageSourceSchema: import("arktype/internal/variants/object.ts").ObjectType<{ type: "file"; file_id: string; }, {}>; export declare const imageSourceSchema: import("arktype/internal/variants/object.ts").ObjectType<{ type: "base64"; data: string; media_type: string; } | { type: "url"; url: string; } | { type: "file"; file_id: string; }, {}>; export declare const systemSchema: import("arktype").BaseType; export declare const userMessageSchema: import("arktype/internal/variants/object.ts").ObjectType<{ role: "user"; content: string | ({ type: "text"; text: string; cache_control?: { type: "ephemeral"; ttl?: "1h" | "5m" | undefined; } | undefined; } | { type: "image"; source: { type: "base64"; data: string; media_type: string; } | { type: "url"; url: string; } | { type: "file"; file_id: string; }; cache_control?: { type: "ephemeral"; ttl?: "1h" | "5m" | undefined; } | undefined; } | { type: "tool_result"; tool_use_id: string; content?: string | ({ type: "text"; text: string; cache_control?: { type: "ephemeral"; ttl?: "1h" | "5m" | undefined; } | undefined; } | { type: "image"; source: { type: "base64"; data: string; media_type: string; } | { type: "url"; url: string; } | { type: "file"; file_id: string; }; cache_control?: { type: "ephemeral"; ttl?: "1h" | "5m" | undefined; } | undefined; })[] | undefined; is_error?: boolean | undefined; cache_control?: { type: "ephemeral"; ttl?: "1h" | "5m" | undefined; } | undefined; } | { type: string; })[]; }, {}>; export declare const systemMessageSchema: import("arktype/internal/variants/object.ts").ObjectType<{ role: "system"; content: string | { type: "text"; text: string; cache_control?: { type: "ephemeral"; ttl?: "1h" | "5m" | undefined; } | undefined; }[]; }, {}>; export declare const assistantMessageSchema: import("arktype/internal/variants/object.ts").ObjectType<{ role: "assistant"; content: string | ({ type: "text"; text: string; cache_control?: { type: "ephemeral"; ttl?: "1h" | "5m" | undefined; } | undefined; } | { type: string; } | { type: "thinking"; thinking: string; signature?: string | undefined; cache_control?: { type: "ephemeral"; ttl?: "1h" | "5m" | undefined; } | undefined; } | { type: "redacted_thinking"; data: string; cache_control?: { type: "ephemeral"; ttl?: "1h" | "5m" | undefined; } | undefined; } | { type: "tool_use"; id: string; name: string; input?: { [x: string]: unknown; } | undefined; cache_control?: { type: "ephemeral"; ttl?: "1h" | "5m" | undefined; } | undefined; })[]; }, {}>; export declare const messageSchema: import("arktype/internal/variants/object.ts").ObjectType<{ role: "user"; content: string | ({ type: "text"; text: string; cache_control?: { type: "ephemeral"; ttl?: "1h" | "5m" | undefined; } | undefined; } | { type: "image"; source: { type: "base64"; data: string; media_type: string; } | { type: "url"; url: string; } | { type: "file"; file_id: string; }; cache_control?: { type: "ephemeral"; ttl?: "1h" | "5m" | undefined; } | undefined; } | { type: "tool_result"; tool_use_id: string; content?: string | ({ type: "text"; text: string; cache_control?: { type: "ephemeral"; ttl?: "1h" | "5m" | undefined; } | undefined; } | { type: "image"; source: { type: "base64"; data: string; media_type: string; } | { type: "url"; url: string; } | { type: "file"; file_id: string; }; cache_control?: { type: "ephemeral"; ttl?: "1h" | "5m" | undefined; } | undefined; })[] | undefined; is_error?: boolean | undefined; cache_control?: { type: "ephemeral"; ttl?: "1h" | "5m" | undefined; } | undefined; } | { type: string; })[]; } | { role: "system"; content: string | { type: "text"; text: string; cache_control?: { type: "ephemeral"; ttl?: "1h" | "5m" | undefined; } | undefined; }[]; } | { role: "assistant"; content: string | ({ type: "text"; text: string; cache_control?: { type: "ephemeral"; ttl?: "1h" | "5m" | undefined; } | undefined; } | { type: string; } | { type: "thinking"; thinking: string; signature?: string | undefined; cache_control?: { type: "ephemeral"; ttl?: "1h" | "5m" | undefined; } | undefined; } | { type: "redacted_thinking"; data: string; cache_control?: { type: "ephemeral"; ttl?: "1h" | "5m" | undefined; } | undefined; } | { type: "tool_use"; id: string; name: string; input?: { [x: string]: unknown; } | undefined; cache_control?: { type: "ephemeral"; ttl?: "1h" | "5m" | undefined; } | undefined; })[]; }, {}>; export declare const toolSchema: import("arktype/internal/variants/object.ts").ObjectType<{ name: string; description?: string | undefined; input_schema: { [x: string]: unknown; }; cache_control?: { type: "ephemeral"; ttl?: "1h" | "5m" | undefined; } | undefined; }, {}>; export declare const toolChoiceSchema: import("arktype/internal/variants/object.ts").ObjectType<{ type: "auto"; disable_parallel_tool_use?: boolean | undefined; } | { type: "any"; disable_parallel_tool_use?: boolean | undefined; } | { type: "none"; disable_parallel_tool_use?: boolean | undefined; } | { type: "tool"; name: string; disable_parallel_tool_use?: boolean | undefined; }, {}>; export declare const thinkingConfigSchema: import("arktype/internal/variants/object.ts").ObjectType<{ type: "enabled"; budget_tokens: number; display?: unknown; } | { type: "disabled"; display?: unknown; } | { type: "adaptive"; budget_tokens?: number | undefined; display?: unknown; }, {}>; export declare const anthropicMessagesRequestSchema: import("arktype/internal/variants/object.ts").ObjectType<{ model: string; messages: ({ role: "user"; content: string | ({ type: "text"; text: string; cache_control?: { type: "ephemeral"; ttl?: "1h" | "5m" | undefined; } | undefined; } | { type: "image"; source: { type: "base64"; data: string; media_type: string; } | { type: "url"; url: string; } | { type: "file"; file_id: string; }; cache_control?: { type: "ephemeral"; ttl?: "1h" | "5m" | undefined; } | undefined; } | { type: "tool_result"; tool_use_id: string; content?: string | ({ type: "text"; text: string; cache_control?: { type: "ephemeral"; ttl?: "1h" | "5m" | undefined; } | undefined; } | { type: "image"; source: { type: "base64"; data: string; media_type: string; } | { type: "url"; url: string; } | { type: "file"; file_id: string; }; cache_control?: { type: "ephemeral"; ttl?: "1h" | "5m" | undefined; } | undefined; })[] | undefined; is_error?: boolean | undefined; cache_control?: { type: "ephemeral"; ttl?: "1h" | "5m" | undefined; } | undefined; } | { type: string; })[]; } | { role: "system"; content: string | { type: "text"; text: string; cache_control?: { type: "ephemeral"; ttl?: "1h" | "5m" | undefined; } | undefined; }[]; } | { role: "assistant"; content: string | ({ type: "text"; text: string; cache_control?: { type: "ephemeral"; ttl?: "1h" | "5m" | undefined; } | undefined; } | { type: string; } | { type: "thinking"; thinking: string; signature?: string | undefined; cache_control?: { type: "ephemeral"; ttl?: "1h" | "5m" | undefined; } | undefined; } | { type: "redacted_thinking"; data: string; cache_control?: { type: "ephemeral"; ttl?: "1h" | "5m" | undefined; } | undefined; } | { type: "tool_use"; id: string; name: string; input?: { [x: string]: unknown; } | undefined; cache_control?: { type: "ephemeral"; ttl?: "1h" | "5m" | undefined; } | undefined; })[]; })[]; max_tokens: number; system?: string | { type: "text"; text: string; cache_control?: { type: "ephemeral"; ttl?: "1h" | "5m" | undefined; } | undefined; }[] | undefined; tools?: { name: string; description?: string | undefined; input_schema: { [x: string]: unknown; }; cache_control?: { type: "ephemeral"; ttl?: "1h" | "5m" | undefined; } | undefined; }[] | undefined; tool_choice?: { type: "auto"; disable_parallel_tool_use?: boolean | undefined; } | { type: "any"; disable_parallel_tool_use?: boolean | undefined; } | { type: "none"; disable_parallel_tool_use?: boolean | undefined; } | { type: "tool"; name: string; disable_parallel_tool_use?: boolean | undefined; } | undefined; temperature?: number | undefined; top_p?: number | undefined; top_k?: number | undefined; stop_sequences?: string[] | undefined; stream?: boolean | undefined; thinking?: { type: "enabled"; budget_tokens: number; display?: unknown; } | { type: "disabled"; display?: unknown; } | { type: "adaptive"; budget_tokens?: number | undefined; display?: unknown; } | undefined; output_config?: { effort?: "high" | "low" | "max" | "medium" | "xhigh" | undefined; task_budget?: { type: "tokens"; total: number; remaining?: number | undefined; } | undefined; format?: unknown; } | undefined; metadata?: { [x: string]: unknown; } | undefined; container?: unknown; context_management?: unknown; mcp_servers?: unknown; service_tier?: unknown; }, {}>; /** * Public types are sourced from the upstream Anthropic SDK so the gateway * stays in lock-step with the canonical API surface; the schemas above are * runtime validators for the subset we actually accept. */ export type AnthropicMessagesRequest = MessageCreateParams; export type AnthropicSystem = MessageCreateParams["system"]; export type AnthropicMessage = MessageParam; export type AnthropicUserContentBlock = ContentBlockParam; export type AnthropicAssistantContentBlock = ContentBlockParam; export type AnthropicTool = Tool; export type AnthropicToolChoice = ToolChoice; export type AnthropicToolResultContent = TextBlockParam | ImageBlockParam;