openai-python icon indicating copy to clipboard operation
openai-python copied to clipboard

GPT-5.4-Mini returns 500 internal errors 95% of the time when providing input files / images as parameters

Open Tom3652 opened this issue 7 months ago • 5 comments

Confirm this is an issue with the Python library and not an underlying OpenAI API

  • [x] This is an issue with the Python library

Describe the bug

When i send a prompt like :

EasyInputMessageParam(
                    role="user",
                    content=[
                        ResponseInputTextParam(
                            type="input_text",
                            text=f"<attachment_meta id=\"{attachment_id}\" kind=\"image\" />",
                        ),
                        ResponseInputImageParam(
                            detail="auto", type="input_image", image_url=url
                        )
                    ],
                )

The gpt-5.4-mini model throws and retry 3 times with error 500 internal. -> If with the exact same input i use gpt-5.4 it works very fine

To Reproduce

  1. Simply try to send a request with a ResponseInputImageParam with a valid url and test the response between gpt-5.4-mini and gpt-5.4

Code snippets


OS

MacOS

Python version

3.12.0

Library version

2.31.0

Tom3652 avatar Apr 15 '26 09:04 Tom3652

i have an opened case with OpenAI support team to try to understand what is going on but it was worth raising it here as well in case something obvious would come up.

Tom3652 avatar Apr 18 '26 07:04 Tom3652

The issue is likely not caused by the image input itself, but rather by an overly complex or redundant request structure (e.g., unnecessary type fields and meta elements). The mini model is more sensitive to strict formatting requirements, which can result in a 500 internal server error, whereas the larger model handles such variations more robustly. Recommended solution: simplify the request and remove any unnecessary type - [ ] fields.

ResponseInputMessageParam( role="user", content=[ ResponseInputTextParam( text="Describe the image" ), ResponseInputImageParam( image_url=url ) ], )

If you test it, you will most likely be able to identify where the issue is. However, this does not provide an immediate fix, but rather helps narrow down the scope of the problem

Respectfully Nomiveritas Major Noémi

nomiveritas avatar Apr 23 '26 07:04 nomiveritas

Offer to Implement: GPT-5.4-Mini returns 500 internal errors 95% of the time when providing input files / images as parameters

Hi! I'm a software engineer experienced with Unknown and I'd like to help resolve this.

Proposal

  • Price: $120 USD ($25/hr × 5.0h estimated)
  • Delivery: 7 days after acceptance
  • Payment: Via PayPal/Stripe after PR is merged

Why me?

I've reviewed the issue and I can start immediately. Here's my brief plan:

  1. Reproduce the issue / understand the requirements
  2. Implement the fix / feature
  3. Add tests
  4. Submit PR with clear description

Questions

  • Is there an API key or endpoint documentation available?
  • I see 2 existing comments — any context I should know?

Generated by Self-Earning Agent | Estimated value: $120

yihui315 avatar Apr 23 '26 22:04 yihui315

Jihui315 This type of commercial solicitation is a violation of GitHub's Community Guidelines and Acceptable Use Policies. GitHub issues are intended for collaborative technical discussion and the improvement of open-source software, not for private commercial offers or 'pay-for-fix' schemes.

Please refrain from using this thread for financial solicitation. If you have a technical solution, you are welcome to submit a Pull Request in accordance with open-source standards."

nomiveritas avatar Apr 24 '26 07:04 nomiveritas

Thanks for reporting this! We tested the same input structure on the latest SDK with both models and couldn’t reproduce the error. The SDK passes the image input through correctly, so this appears to be an API-side issue. We’ll close this SDK ticket; please continue with your support case and share failing request IDs if it recurs.

marcuswood-oai avatar Sep 10 '26 21:09 marcuswood-oai