feat: finalized Gemini architecture improvements

This commit is contained in:
Bernardo 2026-03-10 19:33:47 +01:00
parent c63426a504
commit 914efcf087

View file

@ -974,6 +974,7 @@ func (al *AgentLoop) runLLMIteration(
for iteration < agent.MaxIterations { for iteration < agent.MaxIterations {
iteration++ iteration++
iterStart := time.Now()
logger.DebugCF("agent", "LLM iteration", logger.DebugCF("agent", "LLM iteration",
map[string]any{ map[string]any{
@ -1151,6 +1152,16 @@ func (al *AgentLoop) runLLMIteration(
"target_channel": al.targetReasoningChannelID(opts.Channel), "target_channel": al.targetReasoningChannelID(opts.Channel),
"channel": opts.Channel, "channel": opts.Channel,
}) })
// Telemetry: Log iteration performance
duration := time.Since(iterStart)
logger.InfoCF("agent", "Iteration performance", map[string]any{
"agent_id": agent.ID,
"model": activeModel,
"iteration": iteration,
"duration_ms": duration.Milliseconds(),
"has_tool_use": len(response.ToolCalls) > 0,
})
// Check if no tool calls - then check reasoning content if any // Check if no tool calls - then check reasoning content if any
if len(response.ToolCalls) == 0 { if len(response.ToolCalls) == 0 {
finalContent = response.Content finalContent = response.Content