summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCaptainJack2491 <jayrupnakawala@gmail.com>2026-03-04 17:52:09 +0000
committerCaptainJack2491 <jayrupnakawala@gmail.com>2026-03-04 17:52:09 +0000
commit08fe9e0943aac5806beecb4ad38e25378e866e05 (patch)
tree3570d1ccbbd77eab2125fc6ed453afb519eda808 /src
parent718b635a114a19a0a440fde5e9a1e608a3db05b8 (diff)
fix(agent): added reasoning extraction from groq models
Diffstat (limited to 'src')
-rw-r--r--src/agent.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/agent.py b/src/agent.py
index cfc77e7..77b0de4 100644
--- a/src/agent.py
+++ b/src/agent.py
@@ -153,7 +153,11 @@ class Agent:
if hasattr(response_message, 'reasoning_content') and response_message.reasoning_content:
reasoning = response_message.reasoning_content
reasoning_format = "reasoning_content"
- # 2. Check for reasoning_details (structured — OpenAI reasoning models)
+ # 2. Check for reasoning (Groq GPT-OSS models)
+ elif hasattr(response_message, 'reasoning') and response_message.reasoning:
+ reasoning = response_message.reasoning
+ reasoning_format = "reasoning"
+ # 3. Check for reasoning_details (structured — OpenAI reasoning models)
elif hasattr(response_message, 'reasoning_details') and response_message.reasoning_details:
reasoning_parts = []
for item in response_message.reasoning_details: