Skip to content

[WIP] Add tool_choice to ChatCompletionClient create and create_stream method #6697

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jun 19, 2025

Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.

Original issue description:

Issue body

The tool_choice parameter should accept the following:

  • a list of strings corresponding to the names of the tools that will be provided to the model as the choices
  • a list of Tool types, which also will be converted to a list of strings as their names to be used as the choices

For each model client implementation, use the model API’s convention for the actual create argument passed to the model API. For example, the argument name is tool_choice for OpenAI API.

Related #6695

Fixes #6696.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add tool_choice to ChatCompletionClient create and create_stream method
2 participants