summaryrefslogtreecommitdiff
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
commita3723120073f9486ac771ccf150ec32008d8c2ef (patch)
tree806a39a71d1471a57557649a904c53f28f2f4ef2
parent0f029ab5f844c6399584aec4f5e1cc352e8ab726 (diff)
downloaddotemacs-a3723120073f9486ac771ccf150ec32008d8c2ef.tar.gz
dotemacs-a3723120073f9486ac771ccf150ec32008d8c2ef.zip
fix(ai-config): gptel-model must be a symbol, not a string
The default-backend swap to gpt-5.5 (commit 0f029ab5) 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.
-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