Batch Tool Error on Type Mismatch

The batch tool has started rejecting previously-valid batch submissions. It errors out with a note pointing to a type mismatch that doesn’t exist:

REQUEST:
{"custom_id": "request-1", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "top_p": 0.20, "messages": [{"role": "system", "content": "You are a helpful assistant."},{"role": "user", "content": "Hello world!"}],"max_tokens": 100}}
RESPONSE:
{"id": "batch_req_ID", "custom_id": "request-1", "response": {"status_code": 400, "request_id": "ID", "body": {"error": {"message": "Invalid type for 'top_p': expected a decimal, but got a string instead.", "type": "invalid_request_error", "param": "top_p", "code": "invalid_type"}}}, "error": null}
1 Like

I am getting a similar problem: {“error”: {“message”: “Invalid type for ‘temperature’: expected a decimal, but got a string instead.”, “type”: “invalid_request_error”, “param”: “temperature”, “code”: “invalid_type”}}}, “error”: null}

1 Like

yes, I got the same error with exactly the same code that I used before. it must be a bug on OpenAI’s side… plz fix this soon

1 Like

And I get this error if i re-run previous batches that succeeded – @someone at openai please check this - perhaps there was a change at openai around region settings? Maybe its looking for a comma instead of a point in the number?

1 Like

Thanks for confirming the bug. Glad to know I’m not the only one. Hopefully, we’ll get a fix soon.

I’ve DM-ed the OpenAI, and OpenAIdev account on X with the link to the issue report here. hope they will notice it soon

We fixed this yesterday—sorry for the disruption

3 Likes