import type { ZodSchema } from 'zod';

export type ModelTier = 'cheap' | 'primary' | 'strong';

export interface GatewayRequest {
  feature: string;
  userId: string;
  tier: ModelTier;
  promptKey: string;
  promptVersion: string;
  messages: Array<{ role: 'system' | 'user'; content: string }>;
  outputSchema?: ZodSchema;
  maxTokens?: number;
}

export interface GatewayResponse {
  parsed: Record<string, any>;
  usage: {
    provider: string;
    model: string;
    inputTokens: number;
    outputTokens: number;
    estimatedCost: number;
    latencyMs: number;
  };
}
