From 238aad666eed21d44f06f70cd961f84173bf5c53 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Mon, 27 Oct 2025 10:07:31 +0100 Subject: [PATCH] chore(deps): bump cogito (#6785) chore(deps): Bump cogito Signed-off-by: Ettore Di Giacinto --- core/config/model_config.go | 1 - core/http/endpoints/openai/mcp.go | 5 +---- docs/content/docs/features/mcp.md | 10 +++------- go.mod | 2 +- go.sum | 2 ++ 5 files changed, 7 insertions(+), 13 deletions(-) diff --git a/core/config/model_config.go b/core/config/model_config.go index a9ed12286..a5bd65cdc 100644 --- a/core/config/model_config.go +++ b/core/config/model_config.go @@ -88,7 +88,6 @@ type AgentConfig struct { MaxAttempts int `yaml:"max_attempts" json:"max_attempts"` MaxIterations int `yaml:"max_iterations" json:"max_iterations"` EnableReasoning bool `yaml:"enable_reasoning" json:"enable_reasoning"` - EnableReEvaluation bool `yaml:"enable_re_evaluation" json:"enable_re_evaluation"` EnablePlanning bool `yaml:"enable_planning" json:"enable_planning"` EnableMCPPrompts bool `yaml:"enable_mcp_prompts" json:"enable_mcp_prompts"` EnablePlanReEvaluator bool `yaml:"enable_plan_re_evaluator" json:"enable_plan_re_evaluator"` diff --git a/core/http/endpoints/openai/mcp.go b/core/http/endpoints/openai/mcp.go index 75eba2b74..89d6aa5fa 100644 --- a/core/http/endpoints/openai/mcp.go +++ b/core/http/endpoints/openai/mcp.go @@ -87,6 +87,7 @@ func MCPCompletionEndpoint(cl *config.ModelConfigLoader, ml *model.ModelLoader, cogito.WithMCPs(sessions...), cogito.WithIterations(3), // default to 3 iterations cogito.WithMaxAttempts(3), // default to 3 attempts + cogito.WithForceReasoning(), } if config.Agent.EnableReasoning { @@ -105,10 +106,6 @@ func MCPCompletionEndpoint(cl *config.ModelConfigLoader, ml *model.ModelLoader, cogitoOpts = append(cogitoOpts, cogito.EnableAutoPlanReEvaluator) } - if config.Agent.EnableReEvaluation { - cogitoOpts = append(cogitoOpts, cogito.EnableToolReEvaluator) - } - if config.Agent.MaxIterations != 0 { cogitoOpts = append(cogitoOpts, cogito.WithIterations(config.Agent.MaxIterations)) } diff --git a/docs/content/docs/features/mcp.md b/docs/content/docs/features/mcp.md index 5f9b376cb..2d0fe74f3 100644 --- a/docs/content/docs/features/mcp.md +++ b/docs/content/docs/features/mcp.md @@ -84,7 +84,6 @@ agent: max_attempts: 3 # Maximum number of tool execution attempts max_iterations: 3 # Maximum number of reasoning iterations enable_reasoning: true # Enable tool reasoning capabilities - enable_re_evaluation: false # Enable tool re-evaluation enable_planning: false # Enable auto-planning capabilities enable_mcp_prompts: false # Enable MCP prompts enable_plan_re_evaluator: false # Enable plan re-evaluation @@ -111,7 +110,6 @@ Configure agent behavior and tool execution: - **`max_attempts`**: Maximum number of tool execution attempts (default: 3) - **`max_iterations`**: Maximum number of reasoning iterations (default: 3) - **`enable_reasoning`**: Enable tool reasoning capabilities (default: false) -- **`enable_re_evaluation`**: Enable tool re-evaluation (default: false) - **`enable_planning`**: Enable auto-planning capabilities (default: false) - **`enable_mcp_prompts`**: Enable MCP prompts (default: false) - **`enable_plan_re_evaluator`**: Enable plan re-evaluation (default: false) @@ -179,7 +177,6 @@ agent: max_attempts: 5 max_iterations: 5 enable_reasoning: true - enable_re_evaluation: true enable_planning: true enable_mcp_prompts: true enable_plan_re_evaluator: true @@ -195,7 +192,6 @@ The `agent` section controls how the AI model interacts with MCP tools: ### Reasoning Capabilities - **`enable_reasoning`**: When enabled, the agent uses advanced reasoning to better understand tool results and plan next steps. -- **`enable_re_evaluation`**: When enabled, the agent can re-evaluate previous tool results and decisions, allowing for self-correction and improved accuracy. ### Planning Capabilities - **`enable_planning`**: When enabled, the agent uses auto-planning to break down complex tasks into manageable steps and execute them systematically. The agent will automatically detect when planning is needed. @@ -204,9 +200,9 @@ The `agent` section controls how the AI model interacts with MCP tools: ### Recommended Settings - **Simple tasks**: `max_attempts: 2`, `max_iterations: 2`, `enable_reasoning: false`, `enable_planning: false` -- **Complex tasks**: `max_attempts: 5`, `max_iterations: 5`, `enable_reasoning: true`, `enable_re_evaluation: true`, `enable_planning: true`, `enable_mcp_prompts: true` -- **Advanced planning**: `max_attempts: 5`, `max_iterations: 5`, `enable_reasoning: true`, `enable_re_evaluation: true`, `enable_planning: true`, `enable_mcp_prompts: true`, `enable_plan_re_evaluator: true` -- **Development/Debugging**: `max_attempts: 1`, `max_iterations: 1`, `enable_reasoning: true`, `enable_re_evaluation: true`, `enable_planning: true` +- **Complex tasks**: `max_attempts: 5`, `max_iterations: 5`, `enable_reasoning: true`, `enable_planning: true`, `enable_mcp_prompts: true` +- **Advanced planning**: `max_attempts: 5`, `max_iterations: 5`, `enable_reasoning: true`, `enable_planning: true`, `enable_mcp_prompts: true`, `enable_plan_re_evaluator: true` +- **Development/Debugging**: `max_attempts: 1`, `max_iterations: 1`, `enable_reasoning: true`, `enable_planning: true` ## How It Works diff --git a/go.mod b/go.mod index 46b507e53..7e36f8f14 100644 --- a/go.mod +++ b/go.mod @@ -34,7 +34,7 @@ require ( github.com/mholt/archiver/v3 v3.5.1 github.com/microcosm-cc/bluemonday v1.0.27 github.com/modelcontextprotocol/go-sdk v1.0.0 - github.com/mudler/cogito v0.3.0 + github.com/mudler/cogito v0.4.0 github.com/mudler/edgevpn v0.31.0 github.com/mudler/go-processmanager v0.0.0-20240820160718-8b802d3ecf82 github.com/nikolalohinski/gonja/v2 v2.4.1 diff --git a/go.sum b/go.sum index b501fe0a0..338c7d558 100644 --- a/go.sum +++ b/go.sum @@ -529,6 +529,8 @@ github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= github.com/mudler/cogito v0.3.0 h1:NbVAO3bLkK5oGSY0xq87jlz8C9OIsLW55s+8Hfzeu9s= github.com/mudler/cogito v0.3.0/go.mod h1:abMwl+CUjCp87IufA2quZdZt0bbLaHHN79o17HbUKxU= +github.com/mudler/cogito v0.4.0 h1:CkdzbQplQW6LDUM6mTqupGFiQVluy0nx7xbYgAfBVKs= +github.com/mudler/cogito v0.4.0/go.mod h1:abMwl+CUjCp87IufA2quZdZt0bbLaHHN79o17HbUKxU= github.com/mudler/edgevpn v0.31.0 h1:CXwxQ2ZygzE7iKGl1J+vq9pL5PvsW2uc3qI/zgpNpp4= github.com/mudler/edgevpn v0.31.0/go.mod h1:DKgh9Wu/NM3UbZoPyheMXFvpu1dSLkXrqAOy3oKJN3I= github.com/mudler/go-piper v0.0.0-20241023091659-2494246fd9fc h1:RxwneJl1VgvikiX28EkpdAyL4yQVnJMrbquKospjHyA=