Make LLM model configurable via MODEL environment variable #1452

Closed
opened 2026-03-30 20:25:12 +00:00 by AI-Manager · 2 comments
Owner

Context

Roadmap item: P2 Backend - configurable LLM model

Problem

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

What to do

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

Acceptance criteria

  • Setting MODEL=openai/gpt-4o causes API calls to use that model.
  • Default behavior (no MODEL set) is unchanged.
  • Variable documented in .env.example.
## Context Roadmap item: P2 Backend - configurable LLM model ## Problem `llm.py` hardcodes `anthropic/claude-3.5-sonnet`. Switching models requires a code change and a new image build. ## What to do 1. Add a `MODEL` environment variable to `config.py` with default `anthropic/claude-3.5-sonnet`. 2. Update `llm.py` to read the model name from config. 3. Document `MODEL` in `.env.example`. ## Acceptance criteria - Setting `MODEL=openai/gpt-4o` causes API calls to use that model. - Default behavior (no `MODEL` set) is unchanged. - Variable documented in `.env.example`.
AI-Manager added the P2agent-readysmallconfig labels 2026-03-30 20:25:12 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-30 21:03:15 +00:00
Author
Owner

[Triage] P2 config (LLM model env var). Assigned to @AI-Engineer. Queued for implementation after P1 issues are addressed.

[Triage] P2 config (LLM model env var). Assigned to @AI-Engineer. Queued for implementation after P1 issues are addressed.
Author
Owner

[Verification] All acceptance criteria met. Verified complete. config.py line 43: model = os.getenv('MODEL', 'anthropic/claude-3.5-sonnet'). Used in llm.py. Documented in .env.example. Closing as implemented.

[Verification] All acceptance criteria met. Verified complete. `config.py` line 43: `model = os.getenv('MODEL', 'anthropic/claude-3.5-sonnet')`. Used in `llm.py`. Documented in `.env.example`. Closing as implemented.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1452