revert - #1424
Conversation
PR Summary by QodoPreserve parallel tool calls in OpenAI Responses API
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
1. Additional tool calls are dropped
|
| ToolCallId = functionCall.CallId, | ||
| FunctionName = functionCall.FunctionName.NormalizeFunctionName(), | ||
| FunctionArgs = functionCall.FunctionArguments?.ToString(), | ||
| ToolCalls = toolCalls, |
There was a problem hiding this comment.
1. Additional tool calls are dropped 🐞 Bug ≡ Correctness
The provider now returns every requested call in ToolCalls, but RoutingService.InvokeAgent copies and executes only the legacy singular fields. Any second or later tool call is discarded and omitted from subsequent Responses API history, so the model can re-request it on the next turn.
Agent Prompt
## Issue description
OpenAI Responses now returns all model-requested calls through `RoleDialogModel.ToolCalls`, but the main routing path executes only the first call. Update orchestration to execute every call, retain each call ID and result, and send all call/result pairs back before requesting the next completion.
## Issue Context
The provider keeps the first call in legacy singular fields for compatibility. Multi-call orchestration must avoid recursively requesting another completion after each individual call; all calls from one model response need corresponding outputs in the next request.
## Fix Focus Areas
- src/Plugins/BotSharp.Plugin.OpenAI/Providers/Chat/ChatCompletionProvider.Response.cs[28-49]
- src/Infrastructure/BotSharp.Core/Routing/RoutingService.InvokeAgent.cs[39-65]
- src/Infrastructure/BotSharp.Core/Routing/RoutingService.InvokeAgent.cs[89-130]
- src/Plugins/BotSharp.Plugin.OpenAI/Providers/Chat/ChatCompletionProvider.Response.cs[519-531]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
|
||
| var options = new CreateResponseOptions(_model, []) | ||
| { | ||
| Temperature = temperature, |
There was a problem hiding this comment.
2. Responses temperature is ignored 🐞 Bug ≡ Correctness
Removing CreateResponseOptions.Temperature causes every Responses API request to ignore the conversation's temperature state and use the SDK/API default instead. Configured deterministic or creative behavior therefore changes whenever UseResponseApi is enabled, while the Chat Completions path still honors the same state.
Agent Prompt
## Issue description
Restore propagation of the configured conversation temperature into `CreateResponseOptions`. Continue suppressing temperature only for Responses configurations that cannot accept it, such as the reasoning modes previously covered by the conditional.
## Issue Context
`PrepareResponseOptions` is shared by synchronous, callback-based, and streaming Responses API operations. The sibling Chat Completions initializer demonstrates that `temperature` is conversation state intended to affect provider requests.
## Fix Focus Areas
- src/Plugins/BotSharp.Plugin.OpenAI/Providers/Chat/ChatCompletionProvider.Response.cs[433-459]
- src/Plugins/BotSharp.Plugin.OpenAI/Providers/Chat/ChatCompletionProvider.Chat.cs[607-639]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
No description provided.