New tool_choice as required is not available on azure

according to the latest api_version available on Azure 2024-04-01. tool_choice is not supporting required option.
any idea when it will be available?

4 Likes

Facing the same issue here :pray:

Openai offers two ways to customize the default behavior depending on your use case:

  1. To force the model to always call one or more tools, you can set tool_choice: "required". The model will then select which tool to call. AzureOpenAI doesn’t support this method.
  2. To force the model to call only one specific function, you can set tool_choice: {"type": "file_search"}.

Use the second way, it worked for me.