# New API feature: forcing function calling via \`tool\_choice: "required"\`

**URL:** <https://community.openai.com/t/new-api-feature-forcing-function-calling-via-tool-choice-required/731488>\
**Category:** API\
**Tags:** chat-completion, function-calling, assistants-api, tools, tool-choice\
**Created:** [April 29, 2024, 5:51pm UTC](https://community.openai.com/t/new-api-feature-forcing-function-calling-via-tool-choice-required/731488 "2024-04-29T17:51:25Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![brianz-oai](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/brianz-oai/32/354481_2.png) [@brianz-oai](https://community.openai.com/u/brianz-oai)\
**Post date:** [May 20, 2024, 9:00pm UTC](https://community.openai.com/t/new-api-feature-forcing-function-calling-via-tool-choice-required/731488/13 "2024-05-20T21:00:29Z")

</div>

Yes, that is the expected behavior for `tool_choice: "required"`, though I agree it’s somewhat confusing.

To provide a bit more context, before we introduced this new feature, when you set `tool_choice: {"type": "function", "function": {"name": "my_function"}}`, the `finish_reason` would always be `stop` rather than `tool_calls`. Only when you used the default `tool_choice: "auto"` option, and the model chose to use a tool, the `finish_reason` would be `tool_use`. So when we designed this new feature, we thought it made more sense to provide the consistent behavior as `tool_choice: {"type": "function", "function": {"name": "my_function"}}` as the two are more similar (i.e. model is forced to use a tool).

Fixing this now could potentially break some users’ integration, but we will almost certainly fix this when we release the next API version.

---

_[View the full topic](https://community.openai.com/t/new-api-feature-forcing-function-calling-via-tool-choice-required/731488)._
