From 9a593cbc5a1ae9dfb735bb7b63f579ced651b99f Mon Sep 17 00:00:00 2001 From: Kayvan Sylvan Date: Thu, 12 Feb 2026 17:04:25 -0800 Subject: [PATCH] Remove deprecated OpenAI models from image generation support list - Remove gpt-4o, gpt-4o-mini, gpt-4.1, and gpt-4.1-mini from ImageGenerationSupportedModels - These models are being retired by OpenAI effective February 13, 2026 - Keep gpt-4.1-nano, o3, gpt-5, gpt-5-nano, gpt-5.2 as supported - Update tests to use gpt-5.2 instead of gpt-4o as the example supported model - Update test expectations to reflect deprecated models no longer being supported This ensures users get accurate warnings when attempting image generation with retired models, while maintaining support for currently available models. Co-Authored-By: Warp --- .../plugins/ai/openai/openai_image_test.go | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/internal/plugins/ai/openai/openai_image_test.go b/internal/plugins/ai/openai/openai_image_test.go index f5a102ef..9e581b60 100644 --- a/internal/plugins/ai/openai/openai_image_test.go +++ b/internal/plugins/ai/openai/openai_image_test.go @@ -231,24 +231,24 @@ func TestSupportsImageGeneration(t *testing.T) { expected bool }{ { - name: "gpt-4o supports image generation", + name: "gpt-4o does not support image generation (deprecated)", model: "gpt-4o", - expected: true, + expected: false, }, { - name: "gpt-4o-mini supports image generation", + name: "gpt-4o-mini does not support image generation (deprecated)", model: "gpt-4o-mini", - expected: true, + expected: false, }, { - name: "gpt-4.1 supports image generation", + name: "gpt-4.1 does not support image generation (deprecated)", model: "gpt-4.1", - expected: true, + expected: false, }, { - name: "gpt-4.1-mini supports image generation", + name: "gpt-4.1-mini does not support image generation (deprecated)", model: "gpt-4.1-mini", - expected: true, + expected: false, }, { name: "gpt-4.1-nano supports image generation", @@ -336,7 +336,7 @@ func TestModelValidationLogic(t *testing.T) { t.Run("Supported model with image file should not trigger validation", func(t *testing.T) { opts := &domain.ChatOptions{ - Model: "gpt-4o", + Model: "gpt-5.2", ImageFile: "/tmp/output.png", } @@ -475,7 +475,7 @@ func TestCheckImageGenerationCompatibility(t *testing.T) { }{ { name: "Supported model - no warning", - model: "gpt-4o", + model: "gpt-5.2", expectWarning: false, }, { @@ -557,7 +557,7 @@ func TestSendResponses_WithWarningIntegration(t *testing.T) { }, { name: "Supported model with image - no warning, no error", - model: "gpt-4o", + model: "gpt-5.2", imageFile: "test.png", expectWarning: false, expectError: false,