export type SupportedAIProvider = "openai" | "gemini" | "local";

export interface AIProviderConfig {
  provider: SupportedAIProvider;
  model: string;
  apiKey?: string;
  temperature?: number;
  maxTokens?: number;
  systemPrompt?: string;
}

export interface AgentRunParams {
  shopDomain: string;
  sessionId: string;
  userMessage: string;
  customerAccessToken?: string;
  config?: Partial<AIProviderConfig>;
}

export interface AIProviderResponse {
  reply: string;
  intent?: "order_status" | "general_qa" | "product_search" | "cart_action" | string;
  products?: any[];
  articles?: any[];
  orderInfo?: any;
  toolCalls?: any[];
  toolResults?: any[];
  provider: SupportedAIProvider;
  model: string;
}

export interface AIProvider {
  name: SupportedAIProvider;
  generateResponse(params: AgentRunParams): Promise<AIProviderResponse>;
}
