import { type ShortcutXLLlmOperation, type ShortcutXLModelStreamEffortLevel, type ShortcutXLModelStreamMessage, type ShortcutXLModelStreamRequest, type ShortcutXLModelStreamThinkingType, type ShortcutXLModelStreamTool } from './model-stream.js';
export declare const ShortcutXLModelCallTransportKind: {
    readonly AnthropicMessages: "anthropic_messages";
    readonly OpenAICompletions: "openai_completions";
    readonly OpenAIResponses: "openai_responses";
    readonly ShortcutProxy: "shortcut_proxy";
};
export type ShortcutXLModelCallTransportKind = (typeof ShortcutXLModelCallTransportKind)[keyof typeof ShortcutXLModelCallTransportKind];
/**
 * Request types emitted by private-gateway usage logging.
 *
 * Includes normal LLM operations plus non-chat helper-tool usage and fallback
 * values that the server-v1 observability route accepts.
 */
export declare const ShortcutXLUsageLogRequestTypes: readonly ["chat", "compaction", "suggestions", "summarize", "file_naming", "formula_trace", "code_preview", "sentiment_analysis", "sandbox_llm", "screenshot", "subagent", "unknown"];
export type ShortcutXLUsageLogRequestType = (typeof ShortcutXLUsageLogRequestTypes)[number];
export declare const ShortcutXLModelCallCapability: {
    readonly ImageInput: "image_input";
    readonly JsonToolCalls: "json_tool_calls";
    readonly NonStreamingInvoke: "non_streaming_invoke";
    readonly ReasoningDeltas: "reasoning_deltas";
    readonly TextStreaming: "text_streaming";
    readonly ToolStreaming: "tool_streaming";
};
export type ShortcutXLModelCallCapability = (typeof ShortcutXLModelCallCapability)[keyof typeof ShortcutXLModelCallCapability];
export declare const ShortcutXLProviderUsageStatus: {
    readonly CancelledUsageUnknown: "cancelled_usage_unknown";
    readonly Unavailable: "unavailable";
    readonly UsageAvailable: "usage_available";
};
export type ShortcutXLProviderUsageStatus = (typeof ShortcutXLProviderUsageStatus)[keyof typeof ShortcutXLProviderUsageStatus];
export declare const ShortcutXLUsageReportStatus: {
    readonly Recorded: "recorded";
    readonly ReportFailed: "report_failed";
};
export type ShortcutXLUsageReportStatus = (typeof ShortcutXLUsageReportStatus)[keyof typeof ShortcutXLUsageReportStatus];
export declare const ShortcutXLModelRequestTraceMode: {
    readonly Disabled: "disabled";
    readonly Full: "full";
    readonly MetadataOnly: "metadata_only";
};
export type ShortcutXLModelRequestTraceMode = (typeof ShortcutXLModelRequestTraceMode)[keyof typeof ShortcutXLModelRequestTraceMode];
export declare const ShortcutXLModelCallErrorCategory: {
    readonly Auth: "auth";
    readonly Cancelled: "cancelled";
    readonly CapabilityUnsupported: "capability_unsupported";
    readonly Configuration: "configuration";
    readonly InvalidResponse: "invalid_response";
    readonly ProviderRejected: "provider_rejected";
    readonly RateLimited: "rate_limited";
    readonly TransientNetwork: "transient_network";
    readonly Unknown: "unknown";
};
export type ShortcutXLModelCallErrorCategory = (typeof ShortcutXLModelCallErrorCategory)[keyof typeof ShortcutXLModelCallErrorCategory];
export interface ShortcutXLModelPayload {
    readonly effortLevel?: ShortcutXLModelStreamEffortLevel;
    readonly maxTokens?: number;
    readonly messages: readonly ShortcutXLModelStreamMessage[];
    readonly model: string;
    readonly thinkingType?: ShortcutXLModelStreamThinkingType;
    readonly tools?: readonly ShortcutXLModelStreamTool[];
}
export interface ShortcutXLModelCallContext {
    readonly agentMode?: string;
    readonly fileAttachmentIds?: readonly string[];
    readonly initialFileId?: string;
    readonly interactionMode?: string;
    readonly llmOperation?: ShortcutXLLlmOperation;
    readonly requestId: string;
    readonly speed?: 'fast' | 'standard';
    readonly userMessageId?: string;
}
export interface ShortcutXLModelCall {
    readonly context: ShortcutXLModelCallContext;
    readonly payload: ShortcutXLModelPayload;
}
export interface ShortcutXLModelRequestTraceMetadata {
    readonly effortLevel?: ShortcutXLModelStreamEffortLevel;
    readonly maxTokens?: number;
    readonly messageCount: number;
    readonly model: string;
    readonly requestId: string;
    readonly thinkingType?: ShortcutXLModelStreamThinkingType;
    readonly toolCount: number;
}
export type ShortcutXLPrivateGatewayTraceSyncMode = ShortcutXLModelRequestTraceMode;
export interface ShortcutXLModelUsage {
    readonly cacheCreationInputTokens?: number;
    readonly cacheReadInputTokens?: number;
    readonly inputTokens?: number;
    readonly outputTokens?: number;
    readonly totalTokens?: number;
}
export interface ShortcutXLProviderUsageEvent {
    readonly callId: string;
    readonly model: string;
    readonly status: ShortcutXLProviderUsageStatus;
    readonly transport: ShortcutXLModelCallTransportKind;
    readonly usage?: ShortcutXLModelUsage;
}
export interface ShortcutXLUsageLogRequest {
    readonly clientReportAttempt?: {
        readonly attempt_id: string;
        readonly timeout_ms: number;
    };
    readonly clientUsageStatus: ShortcutXLProviderUsageStatus;
    readonly conversationId?: string;
    readonly metadata?: {
        readonly agent_mode?: string;
        readonly initial_file_id?: string;
        readonly interaction_mode?: string;
        readonly model_call_id?: string;
        readonly transport?: ShortcutXLModelCallTransportKind;
        readonly user_turn_request_id?: string;
        readonly workspace_id?: string;
        readonly workspace_type?: 'file' | 'project' | 'global';
    };
    readonly model: string;
    readonly platform: string;
    readonly provider: string;
    readonly requestId: string;
    readonly requestType: ShortcutXLUsageLogRequestType;
    readonly unavailableReason?: 'provider_did_not_return_usage' | 'gateway_stripped_usage' | 'provider_format_not_supported' | 'stream_cancelled_before_usage';
    readonly usage?: ShortcutXLModelUsage;
    readonly userMessageId?: string;
}
export interface ShortcutXLUsageLogResult {
    readonly callId: string;
    readonly error?: ShortcutXLModelCallError;
    readonly status: ShortcutXLUsageReportStatus;
}
export interface ShortcutXLModelInvokeMessage {
    readonly content: string | readonly Record<string, unknown>[];
    readonly role: 'ai' | 'human' | 'system' | 'tool';
    readonly toolCallId?: string;
    readonly toolCalls?: readonly ShortcutXLModelInvokeToolCall[];
}
export interface ShortcutXLModelInvokeToolSchema {
    readonly description: string;
    readonly name: string;
    readonly parameters: Record<string, unknown>;
}
export interface ShortcutXLModelInvokeToolChoice {
    readonly name: string;
    readonly type: 'tool';
}
export interface ShortcutXLModelInvokePayload {
    readonly effortLevel?: 'low' | 'medium' | 'high';
    readonly maxTokens?: number;
    readonly messages: readonly ShortcutXLModelInvokeMessage[];
    readonly model: string;
    readonly thinkingType?: 'off' | 'on';
    readonly toolChoice?: ShortcutXLModelInvokeToolChoice;
    readonly tools?: readonly ShortcutXLModelInvokeToolSchema[];
}
export interface ShortcutXLModelInvokeToolCall {
    readonly arguments: string;
    readonly id: string;
    readonly name: string;
}
export interface ShortcutXLModelInvokeResponse {
    readonly stopReason?: string;
    readonly text?: string;
    readonly toolCalls?: readonly ShortcutXLModelInvokeToolCall[];
    readonly usageStatus?: ShortcutXLProviderUsageStatus;
}
export interface ShortcutXLModelCallError {
    readonly category: ShortcutXLModelCallErrorCategory;
    readonly message: string;
    readonly providerErrorType?: string;
    readonly retryAfterMs?: number;
    readonly retryable?: boolean;
    readonly status?: number;
}
export declare function createShortcutXLModelCallError(category: ShortcutXLModelCallErrorCategory, message: string, options?: Omit<ShortcutXLModelCallError, 'category' | 'message'>): ShortcutXLModelCallError;
export declare class ShortcutXLModelCallErrorEnvelope extends Error {
    readonly error: ShortcutXLModelCallError;
    constructor(error: ShortcutXLModelCallError);
}
export declare function toShortcutXLModelCallError(error: unknown, fallbackCategory?: ShortcutXLModelCallErrorCategory): ShortcutXLModelCallError;
export declare function splitShortcutXLModelStreamRequest(request: ShortcutXLModelStreamRequest): ShortcutXLModelCall;
export declare function toShortcutXLModelStreamRequest(call: ShortcutXLModelCall): ShortcutXLModelStreamRequest;
//# sourceMappingURL=model-call.d.ts.map