/** * 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.js"; export declare const cacheControlSchema: import("@oh-my-pi/omptype").FluentType<{ ttl?: "1h" | "5m" | undefined; type: "ephemeral"; }, { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; }>; export declare const base64ImageSourceSchema: import("@oh-my-pi/omptype").FluentType<{ data: string; media_type: string; type: "base64"; }, { data: string; media_type: string; type: "base64"; }>; export declare const urlImageSourceSchema: import("@oh-my-pi/omptype").FluentType<{ type: "url"; url: string; }, { type: "url"; url: string; }>; export declare const fileImageSourceSchema: import("@oh-my-pi/omptype").FluentType<{ file_id: string; type: "file"; }, { file_id: string; type: "file"; }>; export declare const imageSourceSchema: import("@oh-my-pi/omptype").FluentType<{ data: string; media_type: string; type: "base64"; } | { type: "url"; url: string; } | { file_id: string; type: "file"; }, { data: string; media_type: string; type: "base64"; } | { type: "url"; url: string; } | { file_id: string; type: "file"; }>; export declare const systemSchema: import("@oh-my-pi/omptype").FluentType; export declare const userMessageSchema: import("@oh-my-pi/omptype").FluentType<{ content: string | ({ cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; text: string; type: "text"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; source: { data: string; media_type: string; type: "base64"; } | { type: "url"; url: string; } | { file_id: string; type: "file"; }; type: "image"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; content?: string | ({ cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; text: string; type: "text"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; source: { data: string; media_type: string; type: "base64"; } | { type: "url"; url: string; } | { file_id: string; type: "file"; }; type: "image"; })[] | undefined; is_error?: boolean | undefined; tool_use_id: string; type: "tool_result"; } | { type: string; })[]; role: "user"; }, { content: string | ({ cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; text: string; type: "text"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; source: { data: string; media_type: string; type: "base64"; } | { type: "url"; url: string; } | { file_id: string; type: "file"; }; type: "image"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; content?: string | ({ cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; text: string; type: "text"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; source: { data: string; media_type: string; type: "base64"; } | { type: "url"; url: string; } | { file_id: string; type: "file"; }; type: "image"; })[] | undefined; is_error?: boolean | undefined; tool_use_id: string; type: "tool_result"; } | { type: string; })[]; role: "user"; }>; export declare const systemMessageSchema: import("@oh-my-pi/omptype").FluentType<{ content: string | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; text: string; type: "text"; }[]; role: "system"; }, { content: string | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; text: string; type: "text"; }[]; role: "system"; }>; export declare const assistantMessageSchema: import("@oh-my-pi/omptype").FluentType<{ content: string | ({ cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; text: string; type: "text"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; signature?: string | undefined; thinking: string; type: "thinking"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; data: string; type: "redacted_thinking"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; id: string; input?: Record | undefined; name: string; type: "tool_use"; } | { type: string; })[]; role: "assistant"; }, { content: string | ({ cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; text: string; type: "text"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; signature?: string | undefined; thinking: string; type: "thinking"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; data: string; type: "redacted_thinking"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; id: string; input?: Record | undefined; name: string; type: "tool_use"; } | { type: string; })[]; role: "assistant"; }>; export declare const messageSchema: import("@oh-my-pi/omptype").FluentType<{ content: string | ({ cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; text: string; type: "text"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; source: { data: string; media_type: string; type: "base64"; } | { type: "url"; url: string; } | { file_id: string; type: "file"; }; type: "image"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; content?: string | ({ cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; text: string; type: "text"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; source: { data: string; media_type: string; type: "base64"; } | { type: "url"; url: string; } | { file_id: string; type: "file"; }; type: "image"; })[] | undefined; is_error?: boolean | undefined; tool_use_id: string; type: "tool_result"; } | { type: string; })[]; role: "user"; } | { content: string | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; text: string; type: "text"; }[]; role: "system"; } | { content: string | ({ cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; text: string; type: "text"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; signature?: string | undefined; thinking: string; type: "thinking"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; data: string; type: "redacted_thinking"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; id: string; input?: Record | undefined; name: string; type: "tool_use"; } | { type: string; })[]; role: "assistant"; }, { content: string | ({ cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; text: string; type: "text"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; source: { data: string; media_type: string; type: "base64"; } | { type: "url"; url: string; } | { file_id: string; type: "file"; }; type: "image"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; content?: string | ({ cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; text: string; type: "text"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; source: { data: string; media_type: string; type: "base64"; } | { type: "url"; url: string; } | { file_id: string; type: "file"; }; type: "image"; })[] | undefined; is_error?: boolean | undefined; tool_use_id: string; type: "tool_result"; } | { type: string; })[]; role: "user"; } | { content: string | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; text: string; type: "text"; }[]; role: "system"; } | { content: string | ({ cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; text: string; type: "text"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; signature?: string | undefined; thinking: string; type: "thinking"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; data: string; type: "redacted_thinking"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; id: string; input?: Record | undefined; name: string; type: "tool_use"; } | { type: string; })[]; role: "assistant"; }>; export declare const toolSchema: import("@oh-my-pi/omptype").FluentType<{ cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; description?: string | undefined; input_schema: Record; name: string; }, { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; description?: string | undefined; input_schema: Record; name: string; }>; export declare const toolChoiceSchema: import("@oh-my-pi/omptype").FluentType<{ disable_parallel_tool_use?: boolean | undefined; type: "any"; } | { disable_parallel_tool_use?: boolean | undefined; type: "none"; } | { disable_parallel_tool_use?: boolean | undefined; name: string; type: "tool"; } | { disable_parallel_tool_use?: boolean | undefined; type: "auto"; }, { disable_parallel_tool_use?: boolean | undefined; type: "auto"; } | { disable_parallel_tool_use?: boolean | undefined; type: "any"; } | { disable_parallel_tool_use?: boolean | undefined; type: "none"; } | { disable_parallel_tool_use?: boolean | undefined; name: string; type: "tool"; }>; export declare const thinkingConfigSchema: import("@oh-my-pi/omptype").FluentType<{ display?: unknown; type: "disabled"; } | { budget_tokens?: number | undefined; display?: unknown; type: "adaptive"; } | { budget_tokens: number; display?: unknown; type: "enabled"; }, { budget_tokens: number; display?: unknown; type: "enabled"; } | { display?: unknown; type: "disabled"; } | { budget_tokens?: number | undefined; display?: unknown; type: "adaptive"; }>; export declare const anthropicMessagesRequestSchema: import("@oh-my-pi/omptype").FluentType<{ container?: unknown; context_management?: unknown; max_tokens: number; mcp_servers?: unknown; messages: ({ content: string | ({ cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; text: string; type: "text"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; source: { data: string; media_type: string; type: "base64"; } | { type: "url"; url: string; } | { file_id: string; type: "file"; }; type: "image"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; content?: string | ({ cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; text: string; type: "text"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; source: { data: string; media_type: string; type: "base64"; } | { type: "url"; url: string; } | { file_id: string; type: "file"; }; type: "image"; })[] | undefined; is_error?: boolean | undefined; tool_use_id: string; type: "tool_result"; } | { type: string; })[]; role: "user"; } | { content: string | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; text: string; type: "text"; }[]; role: "system"; } | { content: string | ({ cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; text: string; type: "text"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; signature?: string | undefined; thinking: string; type: "thinking"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; data: string; type: "redacted_thinking"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; id: string; input?: Record | undefined; name: string; type: "tool_use"; } | { type: string; })[]; role: "assistant"; })[]; metadata?: Record | undefined; model: string; output_config?: { effort?: "high" | "low" | "max" | "medium" | "xhigh" | undefined; format?: unknown; task_budget?: { remaining?: number | undefined; total: number; type: "tokens"; } | undefined; } | undefined; service_tier?: unknown; stop_sequences?: string[] | undefined; stream?: boolean | undefined; system?: string | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; text: string; type: "text"; }[] | undefined; temperature?: number | undefined; thinking?: { display?: unknown; type: "disabled"; } | { budget_tokens?: number | undefined; display?: unknown; type: "adaptive"; } | { budget_tokens: number; display?: unknown; type: "enabled"; } | undefined; tool_choice?: { disable_parallel_tool_use?: boolean | undefined; type: "any"; } | { disable_parallel_tool_use?: boolean | undefined; type: "none"; } | { disable_parallel_tool_use?: boolean | undefined; name: string; type: "tool"; } | { disable_parallel_tool_use?: boolean | undefined; type: "auto"; } | undefined; tools?: { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; description?: string | undefined; input_schema: Record; name: string; }[] | undefined; top_k?: number | undefined; top_p?: number | undefined; }, { container?: unknown; context_management?: unknown; max_tokens: number; mcp_servers?: unknown; messages: ({ content: string | ({ cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; text: string; type: "text"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; source: { data: string; media_type: string; type: "base64"; } | { type: "url"; url: string; } | { file_id: string; type: "file"; }; type: "image"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; content?: string | ({ cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; text: string; type: "text"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; source: { data: string; media_type: string; type: "base64"; } | { type: "url"; url: string; } | { file_id: string; type: "file"; }; type: "image"; })[] | undefined; is_error?: boolean | undefined; tool_use_id: string; type: "tool_result"; } | { type: string; })[]; role: "user"; } | { content: string | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; text: string; type: "text"; }[]; role: "system"; } | { content: string | ({ cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; text: string; type: "text"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; signature?: string | undefined; thinking: string; type: "thinking"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; data: string; type: "redacted_thinking"; } | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; id: string; input?: Record | undefined; name: string; type: "tool_use"; } | { type: string; })[]; role: "assistant"; })[]; metadata?: Record | undefined; model: string; output_config?: { effort?: "high" | "low" | "max" | "medium" | "xhigh" | undefined; format?: unknown; task_budget?: { remaining?: number | undefined; total: number; type: "tokens"; } | undefined; } | undefined; service_tier?: unknown; stop_sequences?: string[] | undefined; stream?: boolean | undefined; system?: string | { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; text: string; type: "text"; }[] | undefined; temperature?: number | undefined; thinking?: { budget_tokens: number; display?: unknown; type: "enabled"; } | { display?: unknown; type: "disabled"; } | { budget_tokens?: number | undefined; display?: unknown; type: "adaptive"; } | undefined; tool_choice?: { disable_parallel_tool_use?: boolean | undefined; type: "auto"; } | { disable_parallel_tool_use?: boolean | undefined; type: "any"; } | { disable_parallel_tool_use?: boolean | undefined; type: "none"; } | { disable_parallel_tool_use?: boolean | undefined; name: string; type: "tool"; } | undefined; tools?: { cache_control?: { ttl?: "1h" | "5m" | undefined; type: "ephemeral"; } | undefined; description?: string | undefined; input_schema: Record; name: string; }[] | undefined; top_k?: number | undefined; top_p?: number | undefined; }>; /** * 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;