With the release of gpt-5 the argument max_tokens has changed to max_completion_tokens. Using max_tokens with gpt-5 or gpt-5-mini returns errors. Reference https://platform.openai.com/docs/api-reference/chat/create
With the release of gpt-5 the argument max_tokens has changed to max_completion_tokens.
Using max_tokens with gpt-5 or gpt-5-mini returns errors.
Reference
https://platform.openai.com/docs/api-reference/chat/create