Skip to content

Commit d94e0bd

Browse files
committed
fix: make sure we propagate reasoning
Signed-off-by: Ettore Di Giacinto <[email protected]>
1 parent 3196b1a commit d94e0bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,6 @@ func generateToolParameters(o *Options, llm LLM, tool Tool, conversation []opena
297297
}
298298

299299
// pickTool selects a tool from available tools with enhanced reasoning
300-
// Similar to agent.go's pickAction but adapted for cogito's architecture
301300
func pickTool(ctx context.Context, llm LLM, fragment Fragment, tools Tools, opts ...Option) (*ToolChoice, string, error) {
302301
o := defaultOptions()
303302
o.Apply(opts...)
@@ -669,6 +668,7 @@ func toolSelection(llm LLM, f Fragment, tools Tools, guidelines Guidelines, tool
669668
xlog.Warn("[toolSelection] Failed to regenerate parameters, using original", "error", err)
670669
} else {
671670
selectedTool = enhancedChoice
671+
selectedTool.Reasoning = reasoning
672672
}
673673
}
674674

0 commit comments

Comments
 (0)