Repository: ErikBjare/gptme
File: gptme/llm/llm_openai_models.py (Python)

Code before:
        "context": 1_047_576,
        "max_output": 32_768,
        "price_input": 0.4,
        "price_output": 1.6,
        "supports_vision": True,
        "knowledge_cutoff": datetime(2024, 6, 1),
        "default_tool_format": "tool",
    },
    "gpt-4.1-nano": {
        "context": 1_047_576,
        "max_output": 32_768,
        "price_input": 0.1,
        "price_output": 0.4,
        "supports_vision": True,
        "knowledge_cutoff": datetime(2024, 6, 1),
        "default_tool_format": "tool",
    },
    # GPT-4o
    "gpt-4o": {
        "context": 128_000,
        "price_input": 5,
        "price_output": 15,
        "supports_vision": True,
        # October 2023
        "knowledge_cutoff": datetime(2023, 10, 1),
        "default_tool_format": "tool",
    },
    "gpt-4o-2024-08-06": {
        "context": 128_000,
        "price_input": 2.5,
        "price_output": 10,
        "knowledge_cutoff": datetime(2023, 10, 1),
        "deprecated": True,
    },
    "gpt-4o-2024-05-13": {
        "context": 128_000,
        "price_input": 5,
        "price_output": 15,
        "knowledge_cutoff": datetime(2023, 10, 1),
        "deprecated": True,
    },
    # GPT-4o mini
    "gpt-4o-mini": {
        "context": 128_000,
        "price_input": 0.15,
        "price_output": 0.6,
        "supports_vision": True,
        "knowledge_cutoff": datetime(2023, 10, 1),
        "default_tool_format": "tool",
    },
    "gpt-4o-mini-2024-07-18": {

Review comment (performance):
I don't think this is needed, it isn't for gpt-4o.

In general, be a lot more conservative about setting default_tool_format to tool, we should only do it when the model doesn't work reliably at all with the markdown default (only to prevent users getting a bad experience with markdown when it isn't working at all, not to hypothetically get better performance).

In my experience, that means GPT-x-codex models should use tool as the default tool format, but not many others (at least not until we've learned so).

Also, don't touch the older models that are deprecated or near-deprecated (like o3). If they need the defaults changes, we'll do it in follow-up, not aggressively change defaults here and now.

Code after:
        "supports_vision": True,
        "knowledge_cutoff": datetime(2024, 6, 1),
    },
    "gpt-4.1-nano": {
        "context": 1_047_576,
        "max_output": 32_768,
        "price_input": 0.1,
        "price_output": 0.4,
        "supports_vision": True,
        "knowledge_cutoff": datetime(2024, 6, 1),
    },
    # GPT-4o
    "gpt-4o": {
        "context": 128_000,
        "price_input": 5,
        "price_output": 15,
        "supports_vision": True,
        # October 2023
        "knowledge_cutoff": datetime(2023, 10, 1),
    },
    "gpt-4o-2024-08-06": {
        "context": 128_000,
        "price_input": 2.5,
        "price_output": 10,
        "knowledge_cutoff": datetime(2023, 10, 1),
        "deprecated": True,
    },
    "gpt-4o-2024-05-13": {
        "context": 128_000,
        "price_input": 5,
        "price_output": 15,
        "knowledge_cutoff": datetime(2023, 10, 1),
        "deprecated": True,
    },
    # GPT-4o mini
    "gpt-4o-mini": {
        "context": 128_000,
        "price_input": 0.15,
        "price_output": 0.6,
        "supports_vision": True,
        "knowledge_cutoff": datetime(2023, 10, 1),
    },
    "gpt-4o-mini-2024-07-18": {
        "context": 128_000,
        "price_input": 0.15,
        "price_output": 0.6,
        "knowledge_cutoff": datetime(2023, 10, 1),
        "deprecated": True,
    },
    # OpenAI o4-mini
    "o4-mini": {