Skip to content

Responses Tool Choice #3548

@iamemilio

Description

@iamemilio

🚀 Describe the new functionality needed

Tool Choice is a feature of responses API that allows you to create rules per response create request for which tools you would like the model to consider or be required to use. This Allows you to have a large number of available tools, but guide the model towards using tools you know will return the context it requires, ultimately leading to higher quality outcomes.

Requirements

  • Add tool_choice to the responses create request
  • Add tool_choice to the responses response object
  • If tool_choice.allowed_tools.tools is not empty --> limit the list of tools passed to the generated completions request to match the allowed tools field.

💡 Why is this needed? What if we don't build it?

Passing this field is a bad request right now, which is bad UX. This is a core functionality of responses API.

Other thoughts

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions