use crate::{ModelPricing, ProviderPricing};

pub const OPENAI: ProviderPricing = ProviderPricing {
	name: "openai",
	models: OPENAI_MODELS,
};

const OPENAI_MODELS: &[ModelPricing] = &[
	ModelPricing {
		name: "gpt-5.5",
		input_cached: Some(0.5),
		input_normal: 5.0,
		output_normal: 30.0,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-5.5-pro",
		input_cached: None,
		input_normal: 30.0,
		output_normal: 180.0,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-5.4",
		input_cached: Some(0.25),
		input_normal: 2.5,
		output_normal: 15.0,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-5.4-mini",
		input_cached: Some(0.075),
		input_normal: 0.75,
		output_normal: 4.5,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-5.4-nano",
		input_cached: Some(0.02),
		input_normal: 0.2,
		output_normal: 1.25,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-5.4-pro",
		input_cached: None,
		input_normal: 30.0,
		output_normal: 180.0,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-5.2",
		input_cached: Some(0.175),
		input_normal: 1.75,
		output_normal: 14.0,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-5.1",
		input_cached: Some(0.125),
		input_normal: 1.25,
		output_normal: 10.0,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-5",
		input_cached: Some(0.125),
		input_normal: 1.25,
		output_normal: 10.0,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-5-mini",
		input_cached: Some(0.025),
		input_normal: 0.25,
		output_normal: 2.0,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-5-nano",
		input_cached: Some(0.005),
		input_normal: 0.05,
		output_normal: 0.4,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-5.3-chat-latest",
		input_cached: Some(0.175),
		input_normal: 1.75,
		output_normal: 14.0,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-5.2-chat-latest",
		input_cached: Some(0.175),
		input_normal: 1.75,
		output_normal: 14.0,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-5.1-chat-latest",
		input_cached: Some(0.125),
		input_normal: 1.25,
		output_normal: 10.0,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-5-chat-latest",
		input_cached: Some(0.125),
		input_normal: 1.25,
		output_normal: 10.0,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-5.3-codex",
		input_cached: Some(0.175),
		input_normal: 1.75,
		output_normal: 14.0,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-5.2-codex",
		input_cached: Some(0.175),
		input_normal: 1.75,
		output_normal: 14.0,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-5.1-codex-max",
		input_cached: Some(0.125),
		input_normal: 1.25,
		output_normal: 10.0,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-5.1-codex",
		input_cached: Some(0.125),
		input_normal: 1.25,
		output_normal: 10.0,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-5-codex",
		input_cached: Some(0.125),
		input_normal: 1.25,
		output_normal: 10.0,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-5.2-pro",
		input_cached: None,
		input_normal: 21.0,
		output_normal: 168.0,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-5-pro",
		input_cached: None,
		input_normal: 15.0,
		output_normal: 120.0,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-4.1",
		input_cached: Some(0.5),
		input_normal: 2.0,
		output_normal: 8.0,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-4.1-mini",
		input_cached: Some(0.1),
		input_normal: 0.4,
		output_normal: 1.6,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-4.1-nano",
		input_cached: Some(0.025),
		input_normal: 0.1,
		output_normal: 0.4,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-4o",
		input_cached: Some(1.25),
		input_normal: 2.5,
		output_normal: 10.0,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-4o-mini",
		input_cached: Some(0.075),
		input_normal: 0.15,
		output_normal: 0.6,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-realtime",
		input_cached: Some(0.4),
		input_normal: 4.0,
		output_normal: 16.0,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-realtime-1.5",
		input_cached: Some(0.4),
		input_normal: 4.0,
		output_normal: 16.0,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-realtime-mini",
		input_cached: Some(0.06),
		input_normal: 0.6,
		output_normal: 2.4,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-4o-realtime-preview",
		input_cached: Some(2.5),
		input_normal: 5.0,
		output_normal: 20.0,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-4o-mini-realtime-preview",
		input_cached: Some(0.3),
		input_normal: 0.6,
		output_normal: 2.4,
		output_reasoning: None,
	},
	ModelPricing {
		name: "o1",
		input_cached: Some(7.5),
		input_normal: 15.0,
		output_normal: 60.0,
		output_reasoning: None,
	},
	ModelPricing {
		name: "o1-pro",
		input_cached: None,
		input_normal: 150.0,
		output_normal: 600.0,
		output_reasoning: None,
	},
	ModelPricing {
		name: "o3-pro",
		input_cached: None,
		input_normal: 20.0,
		output_normal: 80.0,
		output_reasoning: None,
	},
	ModelPricing {
		name: "o3",
		input_cached: Some(0.5),
		input_normal: 2.0,
		output_normal: 8.0,
		output_reasoning: None,
	},
	ModelPricing {
		name: "o3-deep-research",
		input_cached: Some(2.5),
		input_normal: 10.0,
		output_normal: 40.0,
		output_reasoning: None,
	},
	ModelPricing {
		name: "o4-mini",
		input_cached: Some(0.275),
		input_normal: 1.1,
		output_normal: 4.4,
		output_reasoning: None,
	},
	ModelPricing {
		name: "o4-mini-deep-research",
		input_cached: Some(0.5),
		input_normal: 2.0,
		output_normal: 8.0,
		output_reasoning: None,
	},
	ModelPricing {
		name: "o3-mini",
		input_cached: Some(0.55),
		input_normal: 1.1,
		output_normal: 4.4,
		output_reasoning: None,
	},
	ModelPricing {
		name: "o1-mini",
		input_cached: Some(0.55),
		input_normal: 1.1,
		output_normal: 4.4,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-5.1-codex-mini",
		input_cached: Some(0.025),
		input_normal: 0.25,
		output_normal: 2.0,
		output_reasoning: None,
	},
	ModelPricing {
		name: "codex-mini-latest",
		input_cached: Some(0.375),
		input_normal: 1.5,
		output_normal: 6.0,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-5-search-api",
		input_cached: Some(0.125),
		input_normal: 1.25,
		output_normal: 10.0,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-4o-mini-search-preview",
		input_cached: None,
		input_normal: 0.15,
		output_normal: 0.6,
		output_reasoning: None,
	},
	ModelPricing {
		name: "gpt-4o-search-preview",
		input_cached: None,
		input_normal: 2.5,
		output_normal: 10.0,
		output_reasoning: None,
	},
	ModelPricing {
		name: "computer-use-preview",
		input_cached: None,
		input_normal: 3.0,
		output_normal: 12.0,
		output_reasoning: None,
	},
];
