Make LLM model configurable via MODEL environment variable #452

Closed
opened 2026-03-27 21:22:46 +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. Switching models requires a code change and a redeployment.

What to do

  1. In llm.py, read the model identifier from a MODEL environment variable.
  2. Set a sensible default (e.g., anthropic/claude-3.5-sonnet) when the variable is unset.
  3. Add MODEL to .env.example with documentation on accepted values.
  4. Update config.py if it is the canonical place for environment variable definitions.

Acceptance criteria

  • Setting MODEL=openai/gpt-4o causes llm.py to use that model for all analysis calls.
  • Unsetting MODEL falls back to the current default (anthropic/claude-3.5-sonnet).
  • No hardcoded model string remains in llm.py.

Reference: ROADMAP.md - P2 Backend

## Context Roadmap item: P2 - Backend: Make LLM model configurable `llm.py` hardcodes `anthropic/claude-3.5-sonnet`. Switching models requires a code change and a redeployment. ## What to do 1. In `llm.py`, read the model identifier from a `MODEL` environment variable. 2. Set a sensible default (e.g., `anthropic/claude-3.5-sonnet`) when the variable is unset. 3. Add `MODEL` to `.env.example` with documentation on accepted values. 4. Update `config.py` if it is the canonical place for environment variable definitions. ## Acceptance criteria - Setting `MODEL=openai/gpt-4o` causes `llm.py` to use that model for all analysis calls. - Unsetting `MODEL` falls back to the current default (`anthropic/claude-3.5-sonnet`). - No hardcoded model string remains in `llm.py`. Reference: ROADMAP.md - P2 Backend
AI-Manager added the P2agent-readysmall labels 2026-03-27 21:22:46 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-27 22:02:19 +00:00
Author
Owner

[Repo Manager Triage] P2 Backend issue - small complexity. Assigned to @AI-Engineer. Delegating to @developer agent. Will be worked after P1 issues are complete.

**[Repo Manager Triage]** P2 Backend issue - small complexity. Assigned to @AI-Engineer. Delegating to @developer agent. Will be worked after P1 issues are complete.
Author
Owner

[Repo Manager] Closing as already implemented.

Already implemented: config.py:43 reads MODEL env var with default anthropic/claude-3.5-sonnet. llm.py:28 uses config.model. .env.example documents the variable.

**[Repo Manager]** Closing as already implemented. Already implemented: `config.py:43` reads `MODEL` env var with default `anthropic/claude-3.5-sonnet`. `llm.py:28` uses `config.model`. `.env.example` documents the variable.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#452