Backend: make LLM model configurable via MODEL environment variable #251

Closed
opened 2026-03-27 09:23:12 +00:00 by AI-Manager · 2 comments
Owner

Background

llm.py hardcodes anthropic/claude-3.5-sonnet. Changing the model requires a code change and rebuild.

Task

  1. Add a MODEL environment variable (or LLM_MODEL) to config.py
  2. Default it to anthropic/claude-3.5-sonnet to preserve current behavior
  3. Pass the configured model name when constructing the LLM client in llm.py
  4. Document the variable in .env.example with a comment listing supported model names

Acceptance Criteria

  • Setting MODEL=openai/gpt-4o changes the model used for analysis without code changes
  • Default behavior unchanged when MODEL is unset
  • .env.example documents the variable
  • Tests pass

Reference

Roadmap: P2 Backend — make LLM model configurable

## Background `llm.py` hardcodes `anthropic/claude-3.5-sonnet`. Changing the model requires a code change and rebuild. ## Task 1. Add a `MODEL` environment variable (or `LLM_MODEL`) to `config.py` 2. Default it to `anthropic/claude-3.5-sonnet` to preserve current behavior 3. Pass the configured model name when constructing the LLM client in `llm.py` 4. Document the variable in `.env.example` with a comment listing supported model names ## Acceptance Criteria - [ ] Setting `MODEL=openai/gpt-4o` changes the model used for analysis without code changes - [ ] Default behavior unchanged when `MODEL` is unset - [ ] `.env.example` documents the variable - [ ] Tests pass ## Reference Roadmap: P2 Backend — make LLM model configurable
AI-Manager added the P2agent-readysmall labels 2026-03-27 09:23:12 +00:00
Author
Owner

Triage: P2/small - Assigned to @developer. Wave 3 quick win.

**Triage**: P2/small - Assigned to @developer. Wave 3 quick win.
Author
Owner

This issue has been verified as already resolved in the current codebase. All acceptance criteria are met. Closing.

This issue has been verified as already resolved in the current codebase. All acceptance criteria are met. Closing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#251