From 3a88b0d6561c71f8fbf9f4f676a907557953b488 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Sun, 21 Dec 2025 12:53:44 +0200 Subject: [PATCH] Make `gpt-image-1.5` the default image model for OpenAI --- docs/sample-provider-configs/openai.yml | 2 +- etc/app/config.yml.dist | 2 +- src/agent/provider/openai/config.rs | 8 +++++--- src/agent/provider/openai/mod.rs | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/sample-provider-configs/openai.yml b/docs/sample-provider-configs/openai.yml index 05d2ee2..e5186a3 100644 --- a/docs/sample-provider-configs/openai.yml +++ b/docs/sample-provider-configs/openai.yml @@ -17,7 +17,7 @@ text_to_speech: speed: 1.0 response_format: opus image_generation: - model_id: gpt-image-1 + model_id: gpt-image-1.5 style: null size: null quality: null diff --git a/etc/app/config.yml.dist b/etc/app/config.yml.dist index 4be6585..e8f2930 100644 --- a/etc/app/config.yml.dist +++ b/etc/app/config.yml.dist @@ -98,7 +98,7 @@ agents: # speed: 1.0 # response_format: opus # image_generation: - # model_id: gpt-image-1 + # model_id: gpt-image-1.5 # style: null # size: null # quality: null diff --git a/src/agent/provider/openai/config.rs b/src/agent/provider/openai/config.rs index fb45f10..f055868 100644 --- a/src/agent/provider/openai/config.rs +++ b/src/agent/provider/openai/config.rs @@ -1,6 +1,6 @@ use serde::{Deserialize, Serialize}; -use super::OPENAI_IMAGE_MODEL_GPT_IMAGE_1; +use super::OPENAI_IMAGE_MODEL_GPT_IMAGE_1_DOT_5; use crate::agent::{default_prompt, provider::ConfigTrait}; #[derive(Debug, Clone, Serialize, Deserialize)] @@ -162,7 +162,7 @@ pub struct ImageGenerationConfig { impl Default for ImageGenerationConfig { fn default() -> Self { Self { - model_id: OPENAI_IMAGE_MODEL_GPT_IMAGE_1.to_owned(), + model_id: OPENAI_IMAGE_MODEL_GPT_IMAGE_1_DOT_5.to_owned(), style: default_image_style(), size: default_image_size(), quality: default_image_quality(), @@ -180,7 +180,9 @@ impl ImageGenerationConfig { "gpt-image-1" => Ok(async_openai::types::images::ImageModel::GptImage1), "gpt-image-1.5" => Ok(async_openai::types::images::ImageModel::GptImage1dot5), "gpt-image-1-mini" => Ok(async_openai::types::images::ImageModel::GptImage1Mini), - other => Ok(async_openai::types::images::ImageModel::Other(other.to_owned())), + other => Ok(async_openai::types::images::ImageModel::Other( + other.to_owned(), + )), } } } diff --git a/src/agent/provider/openai/mod.rs b/src/agent/provider/openai/mod.rs index f0ab2f7..2ce7bcf 100644 --- a/src/agent/provider/openai/mod.rs +++ b/src/agent/provider/openai/mod.rs @@ -16,7 +16,7 @@ use super::super::AgentInstantiationResult; use super::ConfigTrait; use super::controller::ControllerType; -pub const OPENAI_IMAGE_MODEL_GPT_IMAGE_1: &str = "gpt-image-1"; +pub const OPENAI_IMAGE_MODEL_GPT_IMAGE_1_DOT_5: &str = "gpt-image-1.5"; pub fn create_controller_from_yaml_value_config( agent_id: &str,