"""OpenAI provider and models."""

from llm_cli.providers.base import create_model, create_provider

OPENAI_MODELS = [
    create_model(
        id="gpt-4o",
        provider="openai",
        context_window=128_000,
        max_output=16_384,
        input_price=2.50,
        output_price=10.00,
        capabilities=["vision", "tools", "streaming", "json_mode"],
        training_cutoff="October 2023",
    ),
    create_model(
        id="gpt-4o-mini",
        provider="openai",
        context_window=128_000,
        max_output=16_384,
        input_price=0.15,
        output_price=0.60,
        capabilities=["vision", "tools", "streaming", "json_mode"],
        training_cutoff="October 2023",
    ),
    create_model(
        id="gpt-4-turbo",
        provider="openai",
        context_window=128_000,
        max_output=4_096,
        input_price=10.00,
        output_price=30.00,
        capabilities=["vision", "tools", "streaming", "json_mode"],
        training_cutoff="December 2023",
    ),
    create_model(
        id="gpt-4-turbo-preview",
        provider="openai",
        context_window=128_000,
        max_output=4_096,
        input_price=10.00,
        output_price=30.00,
        capabilities=["tools", "streaming", "json_mode"],
        training_cutoff="December 2023",
    ),
    create_model(
        id="gpt-4",
        provider="openai",
        context_window=8_192,
        max_output=4_096,
        input_price=30.00,
        output_price=60.00,
        capabilities=["tools", "streaming"],
        training_cutoff="September 2021",
    ),
    create_model(
        id="gpt-3.5-turbo",
        provider="openai",
        context_window=16_385,
        max_output=4_096,
        input_price=0.50,
        output_price=1.50,
        capabilities=["tools", "streaming", "json_mode"],
        training_cutoff="September 2021",
    ),
    create_model(
        id="o1",
        provider="openai",
        context_window=200_000,
        max_output=100_000,
        input_price=15.00,
        output_price=60.00,
        capabilities=["reasoning", "tools"],
        training_cutoff="October 2023",
    ),
    create_model(
        id="o1-mini",
        provider="openai",
        context_window=128_000,
        max_output=65_536,
        input_price=3.00,
        output_price=12.00,
        capabilities=["reasoning"],
        training_cutoff="October 2023",
    ),
    create_model(
        id="o1-preview",
        provider="openai",
        context_window=128_000,
        max_output=32_768,
        input_price=15.00,
        output_price=60.00,
        capabilities=["reasoning"],
        training_cutoff="October 2023",
    ),
]

OPENAI_PROVIDER = create_provider(
    id="openai",
    name="OpenAI",
    description="OpenAI (GPT-4, GPT-3.5, o1)",
    models=OPENAI_MODELS,
    env_var="OPENAI_API_KEY",
)
