From 0b5c6a874e5d49a1b552dc7a4d2167d655d983b7 Mon Sep 17 00:00:00 2001 From: opencode Date: Mon, 23 Mar 2026 16:01:28 +0100 Subject: [PATCH] fix: usa sempre agente semplice per Ollama - Rimuovi condizione len(custom_tools) > 0 - Ora usa simple agent per qualsiasi config con provider=ollama --- main.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index 7b0c902..a426a7d 100644 --- a/main.py +++ b/main.py @@ -424,11 +424,9 @@ def create_langcode_agent(system_prompt: Optional[str] = None, use_simple_agent: config = config_manager.get_configuration(active_name) if config and config.get("provider") == "ollama": # Ollama doesn't fully support bind_tools in deepagents - # Check if we have tools - if so, use simple agent - custom_tools = get_custom_tools() - if len(custom_tools) > 0: - print("⚠️ Using simple chat agent (Ollama detected without full tool support)") - use_simple_agent = True + # Always use simple agent for Ollama + print("⚠️ Using simple chat agent (Ollama detected)") + use_simple_agent = True if use_simple_agent: return create_simple_agent(system_prompt)