branch: elpa/gptel
commit 118431efeacf0fa995e9d908a593aea6fff927b8
Author: Karthik Chikmagalur <karthikchikmaga...@gmail.com>
Commit: Karthik Chikmagalur <karthikchikmaga...@gmail.com>

    gptel: Clear reasoning field in multi-turn request
    
    * gptel.el (gptel--handle-wait): Clear the reasoning field from
    INFO when firing a request.  This field may be populated in a
    multi-turn request, such as when using tool-calls with a reasoning
    model. (#743)
---
 gptel.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gptel.el b/gptel.el
index e09756da9f..0115e7fea3 100644
--- a/gptel.el
+++ b/gptel.el
@@ -1979,7 +1979,7 @@ buffer."
   ;; a second network request: gptel tests for the presence of these flags to
   ;; handle state transitions.  (NOTE: Don't add :token to this.)
   (let ((info (gptel-fsm-info fsm)))
-    (dolist (key '(:tool-success :tool-use :error :http-status))
+    (dolist (key '(:tool-success :tool-use :error :http-status :reasoning))
       (when (plist-get info key)
         (plist-put info key nil))))
   (funcall

Reply via email to