From a3723120073f9486ac771ccf150ec32008d8c2ef Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sat, 16 May 2026 06:07:46 -0500 Subject: fix(ai-config): gptel-model must be a symbol, not a string MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- modules/ai-config.el | 8 +++++--- 1 file 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 -- cgit v1.2.3