import {
  ChatMessage,
  ChatOptions,
  ProviderResponse,
} from '../../../types/chat';
import {
  ProviderCapabilities,
  IAIProvider,
  AIProviderMiddleware,
  AIProviderPlugin,
  EmbeddingProvider,
  AIProviderConfig
} from '../../../types/provider';
import {
  StandardizedToolCall,
  GenericToolSchema,
  Tool,
  ParameterDefinition
} from '../../../types/tool';
import { ILogger } from '../../../types/common';

export interface OpenAIProviderConfig extends AIProviderConfig {
  model: string;
}

export type OpenAIMessage = {
  role: string;
  content: string;
  name?: string;
  function_call?: {
    name: string;
    arguments: string;
  };
};

export type OpenAIFunction = {
  name: string;
  description: string;
  parameters: {
    type: string;
    properties: Record<string, ParameterDefinition>;
    required?: string[];
  };
};

export type OpenAIToolCall = {
  id: string;
  type: 'function';
  function: {
    name: string;
    arguments: string;
  };
};

export const MODELS_WITHOUT_SYSTEM_MESSAGES = ['o1-preview', 'gpt-4o'];