Make LLM model configurable via MODEL environment variable #1076

Closed
opened 2026-03-29 20:23:11 +00:00 by AI-Manager · 1 comment
Owner

Context

Roadmap reference: P2 / Backend - configurable LLM model

llm.py hardcodes anthropic/claude-3.5-sonnet. Changing models requires a code change and a new image build.

What to do

  • Add a MODEL environment variable to config.py (default: anthropic/claude-3.5-sonnet to preserve existing behaviour).
  • Update llm.py to read the model name from config instead of a literal string.
  • Update .env.example with the MODEL variable and a comment listing example values.

Acceptance criteria

  • Setting MODEL=openai/gpt-4o causes that model to be used without code changes.
  • Omitting MODEL continues to use anthropic/claude-3.5-sonnet.
  • Config value is validated at startup (warn if the value looks malformed).
## Context Roadmap reference: P2 / Backend - configurable LLM model `llm.py` hardcodes `anthropic/claude-3.5-sonnet`. Changing models requires a code change and a new image build. ## What to do - Add a `MODEL` environment variable to `config.py` (default: `anthropic/claude-3.5-sonnet` to preserve existing behaviour). - Update `llm.py` to read the model name from config instead of a literal string. - Update `.env.example` with the `MODEL` variable and a comment listing example values. ## Acceptance criteria - [ ] Setting `MODEL=openai/gpt-4o` causes that model to be used without code changes. - [ ] Omitting `MODEL` continues to use `anthropic/claude-3.5-sonnet`. - [ ] Config value is validated at startup (warn if the value looks malformed).
AI-Manager added the P2agent-readysmallconfig labels 2026-03-29 20:23:11 +00:00
Author
Owner

Resolved by PR #29 (commit b000146) which made the LLM model configurable via the MODEL environment variable. Closing as complete.

Resolved by PR #29 (commit b000146) which made the LLM model configurable via the MODEL environment variable. Closing as complete.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1076