You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow user to set call LLM/MCP iteration limit to override the hardcoded value.
Example:
```c#
await AIHub.Chat()
.WithModel(Models.OpenAi.Gpt4o)
.WithMessage("Research the weather in Warsaw, then check forecast for next 3 days")
.WithTools(new ToolsConfigurationBuilder()
.AddTool("get_weather", "Get current weather",
parameters: new { type = "object", properties = new { city = new { type = "string" } } },
execute: (args) => $"Weather in {args}: sunny, 22°C")
.WithMaxIterations(3)
.Build())
.CompleteAsync();
```
Do TODO: try to share logic of adding tool to the list across methods
* feat: add an optional MaxIterations parameter
The MaxIterations parameter allows user to configure the call iterations limit instead of relying on the hardcoded value.
Some cleanups (blank lines and == null changed to is null)
* refactor: Apply TODO suggestion about sharing the tool addition logic
* fix(McpService): send final synthesis request on iteration cap instead of returning error string
* fix(McpService): Setting MaxToolIteration for Gemini or Vertex backedn throws an exception
* fix: ToolMaxIteration does not affect MCP
* fix: minor refactors
- OpenAiService uses virtual property instead of hardcoded max iterations.
- Extracted MaxIteration validation
* chore: bump version to 0.10.10 and add release notes
0 commit comments