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
commitd8547aabff9d616034f5ce04ccc64a2ee0cbe63a (patch)
tree28f007555e1ff8cb18b416f63412323b65860dc8
parent1d9c68ddd32e7e9bae175fae248aa66e1cf33a48 (diff)
downloaddotemacs-d8547aabff9d616034f5ce04ccc64a2ee0cbe63a.tar.gz
dotemacs-d8547aabff9d616034f5ce04ccc64a2ee0cbe63a.zip
fix(ai-config): gptel-model must be a symbol, not a string
The default-backend swap to gpt-5.5 (commit 1d9c68dd) 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