Skip to content

Commit 118431e

Browse files
committed
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)
1 parent da01adf commit 118431e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gptel.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1979,7 +1979,7 @@ buffer."
19791979
;; a second network request: gptel tests for the presence of these flags to
19801980
;; handle state transitions. (NOTE: Don't add :token to this.)
19811981
(let ((info (gptel-fsm-info fsm)))
1982-
(dolist (key '(:tool-success :tool-use :error :http-status))
1982+
(dolist (key '(:tool-success :tool-use :error :http-status :reasoning))
19831983
(when (plist-get info key)
19841984
(plist-put info key nil))))
19851985
(funcall

0 commit comments

Comments
 (0)