This pull request includes changes to the OpenAiImageOptions class and its corresponding test class to improve handling of width and height properties. The most important changes include updating the setWidth and setHeight methods to properly compute the size property only when both width and height are set, and updating the test cases to reflect these changes.
Improvements to width and height handling:
models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiImageOptions.java: Updated thesetWidthandsetHeightmethods to computesizeonly when both width and height are non-null. [1] [2]
Test case updates:
models/spring-ai-openai/src/test/java/org/springframework/ai/openai/OpenAiImageOptionsTests.java: Modified test cases to ensuresizeis null when either width or height is not set.
Code cleanup:
models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiImageOptions.java: Reorganized imports to follow standard conventions.
Comment From: markpollack
thanks! merged in 95eb9fd6a350ef4e336b301ea0fd2d148e63dded