Skip to content

Responses max_tool_calls #3563

@iamemilio

Description

@iamemilio

🚀 Describe the new functionality needed

Responses API can accept a max_tool_calls parameter that limits the number of tool calls allowed to be executed for a given response. There are a few things to consider when implementing this:

Requirements

  • When handling inference calls that get converted into chat completions:
    • If a list of tool call requests is returned from the model, truncate that list down to max_tool_calls, then execute the calls for each tool.
    • If max_tool_calls < 0, return Bad Request

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

This is a key functionality of responses and it allows the tool calls made to be filtered down so the model doesn't get overwhelmed by context. Also this is a feature gap.

Other thoughts

No response

Metadata

Metadata

Assignees

No one assigned

    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