This article was originally published on aicoderscope.com
Aider Ignores AIDER_MODEL Setting During Commit Message Generation
Aider fails to respect the AIDER_MODEL environment variable when generating commit messages, causing the application to use an unintended default model. This results in timeout errors, particularly when the default model is unavailable or incompatible with the commit message task. The root cause lies in how commit message generation handles model selection—it may reference a separate AIDER_COMMIT_MSG_MODEL configuration that overrides or bypasses the main AIDER_MODEL setting.
Fix 1: Explicitly Set AIDER_COMMIT_MSG_MODEL
Configure a dedicated model for commit message generation in your ~/.env file:
AIDER_MODEL=qwen3.6-27b
AIDER_COMMIT_MSG_MODEL=qwen3.6-27b
Restart Aider after making changes. This ensures the commit message generation uses the same local model specified in AIDER_MODEL.
Fix 2: Override at Runtime
If you prefer not to modify configuration files, specify the model explicitly when invoking Aider:
aider --commit-msg-model qwen3.6-27b
Verify the current model settings within Aider using:
/models
This command lists available models and confirms which model is active for commit message generation.
Fix 3: Use Configuration File Instead of Environment Variables
Aider may prioritize configuration files over environment variables. Create or edit ~/.config/aider.conf.yml:
model: qwen3.6-27b
commit-msg-model: qwen3.6-27b
Remove conflicting entries from ~/.env to prevent precedence issues. Configuration files provide clearer scoping for feature-specific model selection.
Which Fix to Use
Use Fix 1 for permanent, system-wide configuration across all sessions. Use Fix 2 when you need per-invocation control or when testing different models. Use Fix 3 if environment variables are being overridden elsewhere in your shell initialization or if
Top comments (0)