Skip to content

fix: make detail parameter optional in ResponseInputImage interface #1575

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

princeaden1
Copy link

  • I understand that this repository is auto-generated and my pull request may not be merged

Summary

Makes the detail parameter optional in the ResponseInputImage interface to align with the documented behavior that states it "Defaults to auto".

Problem

The detail parameter was marked as required in the TypeScript interface despite the comment indicating it has a default value of 'auto'. This created unnecessary friction for developers who want to rely on the default behaviour. When the detail is omitted from the code, the openai api perform as expected but IDE will always flag detail as required (typescript). From all the examples provided on openai documentation pages, detail is optional.

Solution

Added the optional modifier (?) to the detail parameter in the ResponseInputImage interface.

Changes

  • Added ? to detail parameter in ResponseInputImage interface
  • Aligns TypeScript interface with documented API behaviour

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Impact

This change will improve developer experience by allowing developers to omit the detail parameter when they want to use the default 'auto' behaviour.

Additional context & links

@princeaden1 princeaden1 requested a review from a team as a code owner July 9, 2025 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants