branch: elpa/gptel
commit 9e79e47fd226adf6d0bdac1dd3a5399fdf6a0ae1
Author: Karthik Chikmagalur <[email protected]>
Commit: Karthik Chikmagalur <[email protected]>
gptel: Change gptel-include-reasoning default
* gptel-request.el (gptel-include-reasoning): Change the default
value of this option to `ignore', meaning that reasoning text in
LLM responses will be included in buffers but ignored on new
conversation turns by gptel-send. (#1326)
* NEWS (Breaking changes): Mention change and reason.
---
NEWS | 17 ++++++++++++-----
gptel-request.el | 8 ++++----
2 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/NEWS b/NEWS
index 52f154ccf2..bb35214392 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,12 @@
** Breaking changes
+- gptel's default ChatGPT backend has been removed. ~gptel-backend~ and
+ ~gptel-model~ now default to =nil=, and there are no registered
+ backends out of the box. However gptel remains usable without
+ configuration: if ~gptel-send~ is called without a backend set, the
+ ChatGPT backend is created on the fly and used.
+
- ~gptel-track-media~ affects gptel's link handling in all Org and
Markdown buffers, not just chat buffers that have ~gptel-mode~ turned
on. When calling ~gptel-send~ with ~gptel-track-media~ turned on, and
@@ -14,11 +20,12 @@
(This is actually how gptel has worked since v0.9.9.3, but this change
in behavior was undocumented.)
-- gptel's default ChatGPT backend has been removed. ~gptel-backend~ and
- ~gptel-model~ now default to =nil=, and there are no registered
- backends out of the box. However gptel remains usable without
- configuration: if ~gptel-send~ is called without a backend set, the
- ChatGPT backend is created on the fly and used.
+- ~gptel-include-reasoning~ now defaults to =ignore=, meaning that
+ reasoning text in LLM responses will be included in buffers but
+ ignored by ~gptel-send~ on subsequent conversation turns. The reason
+ for this change is that including the reasoning text as the LLM's
+ response on new conversation turns is not recommeded by LLM APIs.
+ Reasoning text can also fill up the context window.
- The models =gpt-41-copilot=, =gpt-5= and =claude-opus-41= have been
removed from the default list of GitHub Copilot models. These models
diff --git a/gptel-request.el b/gptel-request.el
index 3c5535d959..fd155c11d6 100644
--- a/gptel-request.el
+++ b/gptel-request.el
@@ -597,7 +597,7 @@ Currently supported options are:
(const :tag "With system message" system)
(const :tag "With user prompt" user)))
-(defcustom gptel-include-reasoning t
+(defcustom gptel-include-reasoning 'ignore
"How to handle LLM reasoning or \"thinking\" text blocks.
Some LLMs include in their response a \"thinking\" section. This
@@ -606,10 +606,10 @@ be interesting to you by itself.
Supported options are the symbols
- t - Include with the response, the default
+ ignore - Include in the response but ignore on subsequent
+ conversation turns (default)
+ t - Include in the response
nil - Do not include
- ignore - Include with the response but ignore on subsequent
- conversation turns
It can also be a string naming a buffer, in which case the
reasoning text will be inserted at the end of that buffer."