/** * Anthropic Messages API 类型定义(最小化) * 仅定义代理层需要用到的类型:请求体(用于 model 覆盖)和 SSE 事件白名单 */ /** Anthropic Messages API 请求体(代理层关注的字段) */ export interface AnthropicMessagesRequest { model: string; max_tokens: number; messages: Array<{ role: 'user' | 'assistant'; content: string | Array>; }>; system?: string | Array>; stream?: boolean; temperature?: number; top_p?: number; top_k?: number; stop_sequences?: string[]; tools?: Array>; tool_choice?: Record; thinking?: Record; metadata?: { user_id?: string; }; } /** Anthropic SSE 标准事件类型白名单 */ export declare const ANTHROPIC_SSE_EVENTS: Set; /** Anthropic 响应中的 token 用量 */ export interface AnthropicUsage { input_tokens: number; output_tokens: number; cache_creation_input_tokens?: number; cache_read_input_tokens?: number; } /** Anthropic 非流式响应(代理层关注的字段) */ export interface AnthropicMessagesResponse { id: string; type: 'message'; role: 'assistant'; content: Array>; model: string; stop_reason: string | null; stop_sequence: string | null; usage: AnthropicUsage; } /** Anthropic 错误响应 */ export interface AnthropicErrorResponse { type: 'error'; error: { type: string; message: string; }; request_id?: string; } //# sourceMappingURL=types.d.ts.map