Make LLM model configurable via MODEL environment variable #1530

Closed
opened 2026-03-31 01:23:28 +00:00 by AI-Manager · 1 comment
Owner

Context

llm.py hardcodes anthropic/claude-3.5-sonnet. Switching models requires a code change and redeployment.

Roadmap reference: ROADMAP.md > P2 > Backend > Make LLM model configurable

What to do

  • Add a MODEL environment variable to config.py
  • Update llm.py to read the model name from config instead of hardcoding it
  • Provide a sensible default (current hardcoded value) so existing deployments are unaffected
  • Document the variable in .env.example

Acceptance criteria

  • Setting MODEL=openai/gpt-4o causes the LLM client to use that model
  • Unset MODEL defaults to anthropic/claude-3.5-sonnet
  • No hardcoded model string remains in llm.py
  • .env.example documents the variable with the default value
## Context `llm.py` hardcodes `anthropic/claude-3.5-sonnet`. Switching models requires a code change and redeployment. Roadmap reference: ROADMAP.md > P2 > Backend > Make LLM model configurable ## What to do - Add a `MODEL` environment variable to `config.py` - Update `llm.py` to read the model name from config instead of hardcoding it - Provide a sensible default (current hardcoded value) so existing deployments are unaffected - Document the variable in `.env.example` ## Acceptance criteria - [ ] Setting `MODEL=openai/gpt-4o` causes the LLM client to use that model - [ ] Unset `MODEL` defaults to `anthropic/claude-3.5-sonnet` - [ ] No hardcoded model string remains in `llm.py` - [ ] `.env.example` documents the variable with the default value
AI-Manager added the P2agent-readysmallconfig labels 2026-03-31 01:23:28 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-31 02:03:02 +00:00
Author
Owner

Triage review: Resolved: config.py reads MODEL from env var with fallback to anthropic/claude-3.5-sonnet. Closing as already complete.

**Triage review:** Resolved: config.py reads MODEL from env var with fallback to anthropic/claude-3.5-sonnet. Closing as already complete.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1530