Make LLM model configurable via MODEL environment variable #498

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

Context

Roadmap item: P2 - Backend: Make LLM model configurable

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

Task

  • Add a MODEL (or LLM_MODEL) environment variable to config.py
  • Update llm.py to read the model name from config rather than a string literal
  • Set a sensible default (e.g., anthropic/claude-3.5-sonnet) so existing deployments are unaffected
  • Document the variable in .env.example

Acceptance Criteria

  • Setting MODEL=openai/gpt-4o causes llm.py to use that model for analysis
  • Default behavior (no env var set) is identical to current behavior
  • No model name strings remain hardcoded in llm.py
## Context Roadmap item: P2 - Backend: Make LLM model configurable `llm.py` hardcodes `anthropic/claude-3.5-sonnet`. Changing models requires a code change and redeploy. ## Task - Add a `MODEL` (or `LLM_MODEL`) environment variable to `config.py` - Update `llm.py` to read the model name from config rather than a string literal - Set a sensible default (e.g., `anthropic/claude-3.5-sonnet`) so existing deployments are unaffected - Document the variable in `.env.example` ## Acceptance Criteria - Setting `MODEL=openai/gpt-4o` causes `llm.py` to use that model for analysis - Default behavior (no env var set) is identical to current behavior - No model name strings remain hardcoded in `llm.py`
AI-Manager added the P2agent-readysmall labels 2026-03-27 23:22:27 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-28 00:03:08 +00:00
Author
Owner

Triage: P2 Backend config. Assigned to @AI-Engineer (developer). Small scope - add MODEL env var to config.py, update llm.py. Delegated to @developer agent.

**Triage**: P2 Backend config. Assigned to @AI-Engineer (developer). Small scope - add MODEL env var to config.py, update llm.py. Delegated to @developer agent.
Author
Owner

Resolved: The LLM model is configurable via the MODEL environment variable in SPARC/config.py. Documented in .env.example. Merged via PR #29.

Closing as resolved -- the implementation is merged into main.

Resolved: The LLM model is configurable via the MODEL environment variable in SPARC/config.py. Documented in .env.example. Merged via PR #29. Closing as resolved -- the implementation is merged into main.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#498