Skip to content

Commit 3a88b0d

Browse files
committed
Make gpt-image-1.5 the default image model for OpenAI
1 parent 08c689a commit 3a88b0d

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

docs/sample-provider-configs/openai.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ text_to_speech:
1717
speed: 1.0
1818
response_format: opus
1919
image_generation:
20-
model_id: gpt-image-1
20+
model_id: gpt-image-1.5
2121
style: null
2222
size: null
2323
quality: null

etc/app/config.yml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ agents:
9898
# speed: 1.0
9999
# response_format: opus
100100
# image_generation:
101-
# model_id: gpt-image-1
101+
# model_id: gpt-image-1.5
102102
# style: null
103103
# size: null
104104
# quality: null

src/agent/provider/openai/config.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use serde::{Deserialize, Serialize};
22

3-
use super::OPENAI_IMAGE_MODEL_GPT_IMAGE_1;
3+
use super::OPENAI_IMAGE_MODEL_GPT_IMAGE_1_DOT_5;
44
use crate::agent::{default_prompt, provider::ConfigTrait};
55

66
#[derive(Debug, Clone, Serialize, Deserialize)]
@@ -162,7 +162,7 @@ pub struct ImageGenerationConfig {
162162
impl Default for ImageGenerationConfig {
163163
fn default() -> Self {
164164
Self {
165-
model_id: OPENAI_IMAGE_MODEL_GPT_IMAGE_1.to_owned(),
165+
model_id: OPENAI_IMAGE_MODEL_GPT_IMAGE_1_DOT_5.to_owned(),
166166
style: default_image_style(),
167167
size: default_image_size(),
168168
quality: default_image_quality(),
@@ -180,7 +180,9 @@ impl ImageGenerationConfig {
180180
"gpt-image-1" => Ok(async_openai::types::images::ImageModel::GptImage1),
181181
"gpt-image-1.5" => Ok(async_openai::types::images::ImageModel::GptImage1dot5),
182182
"gpt-image-1-mini" => Ok(async_openai::types::images::ImageModel::GptImage1Mini),
183-
other => Ok(async_openai::types::images::ImageModel::Other(other.to_owned())),
183+
other => Ok(async_openai::types::images::ImageModel::Other(
184+
other.to_owned(),
185+
)),
184186
}
185187
}
186188
}

src/agent/provider/openai/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use super::super::AgentInstantiationResult;
1616
use super::ConfigTrait;
1717
use super::controller::ControllerType;
1818

19-
pub const OPENAI_IMAGE_MODEL_GPT_IMAGE_1: &str = "gpt-image-1";
19+
pub const OPENAI_IMAGE_MODEL_GPT_IMAGE_1_DOT_5: &str = "gpt-image-1.5";
2020

2121
pub fn create_controller_from_yaml_value_config(
2222
agent_id: &str,

0 commit comments

Comments
 (0)