From f02ce168cfc32a81610d8ff858f86ff02463da70 Mon Sep 17 00:00:00 2001 From: Shehtab Zaman Date: Sun, 12 Oct 2025 02:51:43 -0400 Subject: [PATCH] Handle additional message content in ollama client Enables models to store thinking tokens from model clients --- .../autogen-ext/src/autogen_ext/models/ollama/_ollama_client.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/packages/autogen-ext/src/autogen_ext/models/ollama/_ollama_client.py b/python/packages/autogen-ext/src/autogen_ext/models/ollama/_ollama_client.py index fbd4300c10b0..8cab4c990fb8 100644 --- a/python/packages/autogen-ext/src/autogen_ext/models/ollama/_ollama_client.py +++ b/python/packages/autogen-ext/src/autogen_ext/models/ollama/_ollama_client.py @@ -675,6 +675,8 @@ async def create( if result.message.tool_calls is not None: if result.message.content is not None and result.message.content != "": thought = result.message.content + elif result.message.thinking is not None: + thought = result.message.thinking # NOTE: If OAI response type changes, this will need to be updated content = [ FunctionCall(