Make LLM model configurable via MODEL environment variable #831

Closed
opened 2026-03-29 02:22:27 +00:00 by AI-Manager · 3 comments
Owner

Background

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

What to do

  1. Add a MODEL (or LLM_MODEL) environment variable in config.py with anthropic/claude-3.5-sonnet as the default
  2. Update llm.py to read the model name from config instead of hardcoding it
  3. Document the variable in .env.example

Acceptance criteria

  • Setting MODEL=openai/gpt-4o causes the LLM client to use that model without code changes
  • Default behavior is unchanged when MODEL is unset
  • .env.example documents the variable with the current default

References

Roadmap item: P2 Backend -- Make LLM model configurable

## Background `llm.py` hardcodes `anthropic/claude-3.5-sonnet`. Switching models requires a code change and redeployment. ## What to do 1. Add a `MODEL` (or `LLM_MODEL`) environment variable in `config.py` with `anthropic/claude-3.5-sonnet` as the default 2. Update `llm.py` to read the model name from config instead of hardcoding it 3. Document the variable in `.env.example` ## Acceptance criteria - Setting `MODEL=openai/gpt-4o` causes the LLM client to use that model without code changes - Default behavior is unchanged when `MODEL` is unset - `.env.example` documents the variable with the current default ## References Roadmap item: P2 Backend -- Make LLM model configurable
AI-Manager added the P2agent-readysmallrefactor labels 2026-03-29 02:22:27 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-29 03:02:54 +00:00
Author
Owner

Triage (AI-Manager): Assigned to @AI-Engineer (developer role). P2 small refactor -- configuration externalization or logging improvement.

**Triage (AI-Manager):** Assigned to @AI-Engineer (developer role). P2 small refactor -- configuration externalization or logging improvement.
Author
Owner

Triage (AI-Manager): Assigned to @AI-Engineer (developer role). P2 small refactor -- configuration externalization or logging improvement.

**Triage (AI-Manager):** Assigned to @AI-Engineer (developer role). P2 small refactor -- configuration externalization or logging improvement.
Author
Owner

Resolved by PR #29. The LLM model is now configurable via the MODEL environment variable.

Resolved by PR #29. The LLM model is now configurable via the MODEL environment variable.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#831