Skip to content

Conversation

@ajac-zero
Copy link
Contributor

Finishes #3412 that has gone stale 😿

These changes will be used to complete #3599

@ajac-zero ajac-zero marked this pull request as ready for review December 8, 2025 19:28
@ajac-zero ajac-zero marked this pull request as draft December 8, 2025 19:30
@ajac-zero ajac-zero marked this pull request as ready for review December 8, 2025 20:06
@DouweM DouweM merged commit f6d1152 into pydantic:main Dec 10, 2025
30 checks passed
expected_size: Literal['1024x1024', '1024x1536', '1536x1024'],
) -> None:
tool = ImageGenerationTool(aspect_ratio=aspect_ratio, size=explicit_size)
assert _resolve_openai_image_generation_size(tool) == expected_size
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DouweM I suggest we don't include tests that import private methods. It gets hard to refactor.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Kludex I prefer not to but it's sometimes a lot easier to unit test something than to rely only on the public API surface, and I don't think this method should be public. I think of this as similar to using mocks,, not ideal but acceptable in tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants