microsoft / promptflow

Build high-quality LLM apps - from prototyping, testing to production deployment and monitoring.
https://microsoft.github.io/promptflow/
MIT License
9.5k stars 869 forks source link

[BUG] o1-mini model not supported #3795

Open mgzb opened 1 month ago

mgzb commented 1 month ago

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": "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

github-actions[bot] commented 1 week ago

Hi, we're sending this friendly reminder because we haven't heard back from you in 30 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 7 days of this comment, the issue will be automatically closed. Thank you!

mgzb commented 1 week ago

Bump to prevent automatic closure