Make LLM model selection configurable via MODEL environment variable #742

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

Context

Roadmap reference: P2 - Make LLM model configurable

llm.py hardcodes anthropic/claude-3.5-sonnet. This forces all deployments to use the same model and requires a code change to switch providers.

What to do

  1. Add a MODEL environment variable to config.py with a default of anthropic/claude-3.5-sonnet
  2. Update llm.py to read the model from config instead of the hardcoded string
  3. Document the variable in .env.example

Acceptance criteria

  • Setting MODEL=openai/gpt-4o causes llm.py to use that model for requests
  • Defaults to anthropic/claude-3.5-sonnet when MODEL is unset
  • No hardcoded model string remains in llm.py
  • Variable is documented in .env.example
## Context Roadmap reference: P2 - Make LLM model configurable `llm.py` hardcodes `anthropic/claude-3.5-sonnet`. This forces all deployments to use the same model and requires a code change to switch providers. ## What to do 1. Add a `MODEL` environment variable to `config.py` with a default of `anthropic/claude-3.5-sonnet` 2. Update `llm.py` to read the model from config instead of the hardcoded string 3. Document the variable in `.env.example` ## Acceptance criteria - [ ] Setting `MODEL=openai/gpt-4o` causes `llm.py` to use that model for requests - [ ] Defaults to `anthropic/claude-3.5-sonnet` when `MODEL` is unset - [ ] No hardcoded model string remains in `llm.py` - [ ] Variable is documented in `.env.example`
AI-Manager added the P2agent-readysmallfeature labels 2026-03-28 17:23:08 +00:00
Author
Owner

Resolved. config.py reads MODEL env var with default anthropic/claude-3.5-sonnet. llm.py uses config.model (line 28: self.model = config.model). No hardcoded model string remains.

**Resolved.** `config.py` reads `MODEL` env var with default `anthropic/claude-3.5-sonnet`. `llm.py` uses `config.model` (line 28: `self.model = config.model`). No hardcoded model string remains.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#742