Skip to content

feat: add ImageDetail as a named public type alias#2902

Open
thakoreh wants to merge 1 commit intoopenai:mainfrom
thakoreh:feat/add-image-detail-type-alias-v2
Open

feat: add ImageDetail as a named public type alias#2902
thakoreh wants to merge 1 commit intoopenai:mainfrom
thakoreh:feat/add-image-detail-type-alias-v2

Conversation

@thakoreh
Copy link

Summary

Adds ImageDetail as a named public type alias, similar to ReasoningEffort.

Changes

  • Created src/openai/types/shared/image_detail.py with ImageDetail type alias
  • Exported ImageDetail from src/openai/types/shared/__init__.py
  • Exported ImageDetail from src/openai/types/__init__.py

Details

ImageDetail is defined as Optional[Literal['auto', 'low', 'high']], matching the existing usage in image-related parameters throughout the codebase.

This provides a consistent, named type that can be imported and used instead of repeating the Literal type annotation.

Fixes #2889

Add ImageDetail type alias similar to ReasoningEffort for consistency.
This provides a named type for image detail parameters that can be
imported and used throughout the codebase.

ImageDetail is defined as Optional[Literal['auto', 'low', 'high']].

Fixes openai#2889
@thakoreh thakoreh requested a review from a team as a code owner February 27, 2026 03:13
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.

Add ImageDetail as a named public type alias (like ReasoningEffort)

1 participant