Skip to content

Commit e581fa5

Browse files
author
Jicheng Lu
committed
fix reasoning effort
1 parent ee73e6e commit e581fa5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Plugins/BotSharp.Plugin.OpenAI/Providers/Chat/ChatCompletionProvider.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -595,8 +595,12 @@ private ChatCompletionOptions InitChatCompletionOption(Agent agent)
595595
float? temperature = null;
596596
ChatReasoningEffortLevel? reasoningEffortLevel = null;
597597

598-
var level = _state.GetState("reasoning_effort_level")
599-
.IfNullOrEmptyAs(agent?.LlmConfig?.ReasoningEffortLevel);
598+
var level = _state.GetState("reasoning_effort_level");
599+
600+
if (string.IsNullOrEmpty(level) && _model == agent?.LlmConfig?.Model)
601+
{
602+
level = agent?.LlmConfig?.ReasoningEffortLevel;
603+
}
600604

601605
if (settings == null)
602606
{

0 commit comments

Comments
 (0)