aboutsummaryrefslogtreecommitdiff
path: root/modules/ai-config.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-16 06:07:46 -0500
committerCraig Jennings <c@cjennings.net>2026-05-16 06:07:46 -0500
commite3733f46892da0425e2424e8a9ba91f83041abe4 (patch)
treed44cbfc762d8d24aedd4ca956f62458b0433d53b /modules/ai-config.el
parentf16fa4e42c0b414bf1a07e7d56eed661c2e49732 (diff)
downloaddotemacs-e3733f46892da0425e2424e8a9ba91f83041abe4.tar.gz
dotemacs-e3733f46892da0425e2424e8a9ba91f83041abe4.zip
fix(ai-config): gptel-model must be a symbol, not a string
The default-backend swap to gpt-5.5 (commit f16fa4e4) set `gptel-model' as the string "gpt-5.5". gptel's modeline-display code calls `symbolp' on the model value and signals `wrong-type-argument symbolp "gpt-5.5"' on every render, which manifested as Emacs freezing in the AI-Assistant buffer ("Querying ChatGPT..." → error in process sentinel → repeated redisplay errors). Both default-setting sites now use `'gpt-5.5' (interned symbol). The Anthropic backend tolerated string model names so the original "claude-opus-4-7" string worked, which is why this hadn't surfaced before.
Diffstat (limited to 'modules/ai-config.el')
-rw-r--r--modules/ai-config.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/ai-config.el b/modules/ai-config.el
index cef929c1..050efbd4 100644
--- a/modules/ai-config.el
+++ b/modules/ai-config.el
@@ -150,7 +150,7 @@ Call this only after loading `gptel' so the backend constructors exist."
;; Set default backend and model
(unless gptel-backend
(setq gptel-backend (or gptel-chatgpt-backend gptel-claude-backend))
- (setq gptel-model "gpt-5.5")))
+ (setq gptel-model 'gpt-5.5)))
;; ------------------ GPTel Conversation And Utility Commands ------------------
@@ -377,9 +377,11 @@ Works for any buffer, whether it's visiting a file or not."
(gptel--debug nil)
:config
(cj/ensure-gptel-backends)
- ;; Set ChatGPT (gpt-5.5) as default after initialization
+ ;; Set ChatGPT (gpt-5.5) as default after initialization. Model
+ ;; must be a symbol -- gptel's modeline-display code calls `symbolp'
+ ;; on it and signals `wrong-type-argument' otherwise.
(setq gptel-backend gptel-chatgpt-backend)
- (setq gptel-model "gpt-5.5")
+ (setq gptel-model 'gpt-5.5)
(setq gptel-confirm-tool-calls nil) ;; allow tool access by default