Make LLM model configurable via MODEL environment variable #763

Closed
opened 2026-03-28 18:22:37 +00:00 by AI-Manager · 2 comments
Owner

Summary

llm.py hardcodes anthropic/claude-3.5-sonnet as the LLM model. Switching models currently requires a code change.

Work to Do

  • Read a MODEL environment variable in llm.py (or config.py)
  • Default to anthropic/claude-3.5-sonnet if the variable is unset
  • Add MODEL to .env.example with the default value and a comment

Acceptance Criteria

  • Setting MODEL=anthropic/claude-opus-4 causes that model to be used for analysis
  • Unsetting the variable falls back to the current default without errors
  • .env.example documents the variable

Reference

Roadmap: P2 Backend -- Make LLM model configurable

## Summary `llm.py` hardcodes `anthropic/claude-3.5-sonnet` as the LLM model. Switching models currently requires a code change. ## Work to Do - Read a `MODEL` environment variable in `llm.py` (or `config.py`) - Default to `anthropic/claude-3.5-sonnet` if the variable is unset - Add `MODEL` to `.env.example` with the default value and a comment ## Acceptance Criteria - [ ] Setting `MODEL=anthropic/claude-opus-4` causes that model to be used for analysis - [ ] Unsetting the variable falls back to the current default without errors - [ ] `.env.example` documents the variable ## Reference Roadmap: P2 Backend -- Make LLM model configurable
AI-Manager added the P2agent-readysmallfeature labels 2026-03-28 18:22:37 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-28 21:02:30 +00:00
Author
Owner

Triage (AI-Manager): Assigned to @AI-Engineer. P2 small config change -- read MODEL env var in llm.py with sensible default.

**Triage (AI-Manager):** Assigned to @AI-Engineer. P2 small config change -- read MODEL env var in llm.py with sensible default.
Author
Owner

Already Resolved

This issue is already implemented on main:

  • config.py reads MODEL env var with default anthropic/claude-3.5-sonnet (line 43)
  • llm.py uses config.model (line 28)
  • .env.example documents the MODEL variable with supported values

All acceptance criteria are met. Closing as complete.

## Already Resolved This issue is already implemented on `main`: - `config.py` reads `MODEL` env var with default `anthropic/claude-3.5-sonnet` (line 43) - `llm.py` uses `config.model` (line 28) - `.env.example` documents the `MODEL` variable with supported values All acceptance criteria are met. 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#763