From 85280689953d18c7d681acd200a45b91608a7f84 Mon Sep 17 00:00:00 2001 From: opencode Date: Mon, 23 Mar 2026 17:47:24 +0100 Subject: [PATCH] fix: force reload module to avoid cached version --- main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.py b/main.py index 7ef87e9..24d7684 100644 --- a/main.py +++ b/main.py @@ -429,7 +429,12 @@ def create_langcode_agent(system_prompt: Optional[str] = None, use_simple_agent: # Use OllamaToolAgent for Ollama with tool calling if is_ollama and not use_simple_agent: try: + # Force reload the module + import importlib + import ollama_agent + importlib.reload(ollama_agent) from ollama_agent import create_ollama_tool_agent + model = load_model_from_config() custom_tools = get_custom_tools()