Skip to content

[Bug]: gpt-5-nano param mismatch #529

@rogerconsul-cw

Description

@rogerconsul-cw

Opencommit Version

3.2.10

Node Version

v25.2.1

NPM Version

11.6.2

What OS are you seeing the problem on?

Mac

What happened?

A bug happened!
message: "Unsupported parameter: 'max_tokens' is not supported with this model. Use 'max_completion_tokens' instead.",
Model used: gpt-5-nano-2025-08-07

Expected Behavior

Expected 200 response from OpenAI

Current Behavior

Got a sad 400 :(

Possible Solution

Adjust request payload

Steps to Reproduce

Try any commit using gpt-5-nano

Relevant log output

request_id: 'req_03b71c5ebe09440982ef182fb07f0d06',
  error: {
    message: "Unsupported parameter: 'max_tokens' is not supported with this model. Use 'max_completion_tokens' instead.",
    type: 'invalid_request_error',
    param: 'max_tokens',
    code: 'unsupported_parameter'
  },
  code: 'unsupported_parameter',
  param: 'max_tokens',
  type: 'invalid_request_error'
}
│
└  ✖ 400 Unsupported parameter: 'max_tokens' is not supported with this model. Use 'max_completion_tokens' instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions