export interface ProviderMessage {
    readonly role: 'system' | 'user' | 'assistant' | 'tool';
    readonly content: string;
    readonly name?: string;
    readonly toolCallId?: string;
    readonly toolCalls?: ProviderToolCall[];
}
export interface ProviderToolDescriptor {
    readonly type: 'function';
    readonly function: {
        readonly name: string;
        readonly description: string;
        readonly parameters: {
            type: 'object';
            properties: Record<string, {
                type: string;
                description?: string;
            }>;
            required?: string[];
        };
    };
}
export interface ProviderToolCall {
    readonly id: string;
    readonly type: 'function';
    readonly function: {
        readonly name: string;
        readonly arguments: string;
    };
}
export interface ProviderRequest {
    readonly model: string;
    readonly messages: ProviderMessage[];
    readonly maxTokens?: number;
    readonly temperature?: number;
    readonly stopSequences?: readonly string[];
    readonly routingDecisionId?: string;
    readonly tools?: ProviderToolDescriptor[];
}
export interface ProviderUsage {
    readonly inputTokens: number;
    readonly outputTokens: number;
}
export type ProviderStopReason = 'end_turn' | 'max_tokens' | 'stop_sequence' | 'tool_use' | 'error';
export interface ProviderResponse {
    readonly id: string;
    readonly model: string;
    readonly text: string;
    readonly stopReason: ProviderStopReason;
    readonly usage: ProviderUsage;
    readonly resolvedModel?: string;
    readonly toolCalls?: ProviderToolCall[];
}
export type ProviderStreamChunk = {
    readonly type: 'text_delta';
    readonly text: string;
} | {
    readonly type: 'tool_call_delta';
    readonly index: number;
    readonly id?: string;
    readonly name?: string;
    readonly argumentsDelta?: string;
} | {
    readonly type: 'stop';
    readonly stopReason: ProviderStopReason;
    readonly usage: ProviderUsage;
    readonly toolCalls?: ProviderToolCall[];
    readonly text: string;
    readonly resolvedModel?: string;
};
export interface ModelProvider {
    readonly name: string;
    readonly supportedModels: readonly string[];
    isAvailable(): boolean;
    invoke(request: ProviderRequest): Promise<ProviderResponse>;
    invokeStream?(request: ProviderRequest): AsyncGenerator<ProviderStreamChunk, void, void>;
}
