Make gpt-image-1.5 the default image model for OpenAI

This commit is contained in:
Slavi Pantaleev
2025-12-21 12:53:44 +02:00
parent 08c689a889
commit 3a88b0d656
4 changed files with 8 additions and 6 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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(),
)),
}
}
}

View File

@@ -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,