promptflow icon indicating copy to clipboard operation
promptflow copied to clipboard

[BUG] o1-mini model not supported

Open mgzb opened this issue 1 year ago • 0 comments

Describe the bug Attempting to use the Azure OpenAI o1-mini model results in the exception:

pf.flow.node_test failed with UserErrorException: Exception: OpenAI API hits BadRequestError: Error code: 400 - {'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'}} [Error reference: https://platform.openai.com/docs/guides/error-codes/api-errors]

How To Reproduce the bug Configure a tool to use an instance of o1-mini. Execute it.

Expected behavior The model responds.

Screenshots

pf.flow.node_test failed with UserErrorException: Exception: OpenAI API hits BadRequestError: Error code: 400 - {'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'}} [Error reference: https://platform.openai.com/docs/guides/error-codes/api-errors]
image image

Running Information(please complete the following information):

  • Promptflow Package Version using pf -v: [e.g. 0.0.102309906]
  • Operating System: [e.g. Ubuntu 20.04, Windows 11]
  • Python Version using python --version: [e.g. python==3.10.12]
{
  "promptflow": "1.16.0",
  "promptflow-azure": "1.16.0",
  "promptflow-core": "1.16.0",
  "promptflow-devkit": "1.16.0",
  "promptflow-tracing": "1.16.0"
}

OSX 14.4, python==3.10.13

mgzb avatar Oct 02 '24 18:10 mgzb