Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

stephentoub
Copy link
Member

@stephentoub stephentoub commented Jul 10, 2025

Folks are bumping up against the arbitrary limit of 10, as various modern models are super chatty with tools. While we need a limit to avoid runaway execution, we can make it much higher.

Microsoft Reviewers: Open in CodeFlow

…o 40

Folks are bumping up against the arbitrary limit of 10, as various modern models are super chatty with tools. While we need a limit to avoid runaway execution, we can make it much higher.
@stephentoub stephentoub requested a review from a team as a code owner July 10, 2025 17:32
@github-actions github-actions bot added the area-ai Microsoft.Extensions.AI libraries label Jul 10, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR increases the default MaximumIterationsPerRequest from 10 to 40 to accommodate more verbose model interactions while still guarding against runaway loops.

  • Updated default in FunctionInvokingChatClient source and XML docs
  • Adjusted corresponding unit tests to expect 40 instead of 10

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
test/Libraries/Microsoft.Extensions.AI.Tests/ChatCompletion/FunctionInvokingChatClientTests.cs Updated assertions to expect 40 as the default
src/Libraries/Microsoft.Extensions.AI/ChatCompletion/FunctionInvokingChatClient.cs Changed default field initializer and docs to 40

@stephentoub stephentoub merged commit d651ccc into dotnet:main Jul 11, 2025
7 checks passed
@stephentoub stephentoub deleted the raisedefault branch July 11, 2025 13:56
jeffhandley pushed a commit to jeffhandley/extensions that referenced this pull request Jul 14, 2025
…o 40 (dotnet#6599)

Folks are bumping up against the arbitrary limit of 10, as various modern models are super chatty with tools. While we need a limit to avoid runaway execution, we can make it much higher.
jeffhandley pushed a commit that referenced this pull request Jul 15, 2025
…o 40 (#6599)

Folks are bumping up against the arbitrary limit of 10, as various modern models are super chatty with tools. While we need a limit to avoid runaway execution, we can make it much higher.
@github-actions github-actions bot locked and limited conversation to collaborators Aug 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-ai Microsoft.Extensions.AI libraries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants