mirror of
https://github.com/doomemacs/doomemacs.git
synced 2026-03-22 22:40:45 -07:00
fix(llm): gptel-magit: interop w/ gptel-include-reasoning
Resolves an upstream issue caused if `gptel-include-reasoning` is enabled. Solution is adapted from a reply to the report.. Ref: ragnard/gptel-magit#8
This commit is contained in:
parent
21e372b531
commit
0ec6255f23
1 changed files with 13 additions and 1 deletions
|
|
@ -27,7 +27,19 @@
|
|||
|
||||
(use-package! gptel-magit
|
||||
:when (modulep! :tools magit)
|
||||
:hook (magit-mode . gptel-magit-install))
|
||||
:hook (magit-mode . gptel-magit-install)
|
||||
:config
|
||||
;; HACK: `gptel-include-reasoning' can break gptel-magit, and needs to be
|
||||
;; excluded if you use openrouter.
|
||||
;; REVIEW: Remove when ragnard/gptel-magit#8 is resolved.
|
||||
(defadvice! +llm--fix-gptel-magit--omit-reasoning-a (fn &rest args)
|
||||
:around #'gptel-magit--generate
|
||||
(let ((gptel-include-reasoning nil)
|
||||
(gptel--request-params
|
||||
(if (eq gptel-magit-backend gptel--openrouter)
|
||||
'(:reasoning (:exclude t :effort "minimal"))
|
||||
nil)))
|
||||
(apply fn args))))
|
||||
|
||||
|
||||
(use-package! ob-gptel
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue