Issue
When loading efrit, a warning appears:
Warning (defvaralias): Overwriting value of 'efrit-model' by aliasing to 'efrit-default-model'
Cause
The variable efrit-model is defined in two places with conflicting definitions:
efrit-do.el:111 - defines efrit-model as defcustom:
(defcustom efrit-model "claude-sonnet-4-20250514"
efrit-chat.el:58 - defines efrit-model as alias to efrit-default-model:
(defvaralias 'efrit-model 'efrit-default-model)
efrit-config.el:123 - defines the target variable:
(defcustom efrit-default-model "claude-3-5-sonnet-20241022"
Load Order Issue
When efrit-do.el loads before efrit-chat.el:
efrit-model gets set to "claude-sonnet-4-20250514"
- Then
efrit-chat.el tries to alias it to efrit-default-model
- This overwrites the existing value, triggering the warning
Suggested Fix
Consolidate efrit-model definition to a single location (likely efrit-config.el) and use defvar declarations in other files:
;; In efrit-do.el and efrit-chat.el, replace defcustom/defvaralias with:
(defvar efrit-model) ; defined in efrit-config
Or remove the alias in efrit-chat.el and use efrit-default-model directly where needed.
Issue
When loading efrit, a warning appears:
Cause
The variable
efrit-modelis defined in two places with conflicting definitions:efrit-do.el:111- definesefrit-modelasdefcustom:efrit-chat.el:58- definesefrit-modelas alias toefrit-default-model:efrit-config.el:123- defines the target variable:Load Order Issue
When
efrit-do.elloads beforeefrit-chat.el:efrit-modelgets set to"claude-sonnet-4-20250514"efrit-chat.eltries to alias it toefrit-default-modelSuggested Fix
Consolidate
efrit-modeldefinition to a single location (likelyefrit-config.el) and usedefvardeclarations in other files:Or remove the alias in
efrit-chat.eland useefrit-default-modeldirectly where needed.