From ad7dc2ef71e55a3498066d1ed2b5e6080def066b Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Thu, 15 May 2025 10:22:13 -0400 Subject: [PATCH] Enable vision for o3 and o4-mini, closes #1037 --- llm/default_plugins/openai_models.py | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/llm/default_plugins/openai_models.py b/llm/default_plugins/openai_models.py index 0ecc631..178740c 100644 --- a/llm/default_plugins/openai_models.py +++ b/llm/default_plugins/openai_models.py @@ -134,12 +134,28 @@ def register_models(register): AsyncChat("o3-mini", reasoning=True, supports_schema=True, supports_tools=True), ) register( - Chat("o3", reasoning=True, supports_schema=True, supports_tools=True), - AsyncChat("o3", reasoning=True, supports_schema=True, supports_tools=True), + Chat( + "o3", vision=True, reasoning=True, supports_schema=True, supports_tools=True + ), + AsyncChat( + "o3", vision=True, reasoning=True, supports_schema=True, supports_tools=True + ), ) register( - Chat("o4-mini", reasoning=True, supports_schema=True, supports_tools=True), - AsyncChat("o4-mini", reasoning=True, supports_schema=True, supports_tools=True), + Chat( + "o4-mini", + vision=True, + reasoning=True, + supports_schema=True, + supports_tools=True, + ), + AsyncChat( + "o4-mini", + vision=True, + reasoning=True, + supports_schema=True, + supports_tools=True, + ), ) # The -instruct completion model register(