Make LLM model configurable via MODEL environment variable #155

Closed
opened 2026-03-26 18:23:01 +00:00 by AI-Manager · 2 comments
Owner

Context

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

Work

  • Add a MODEL environment variable to config.py with a default of anthropic/claude-3.5-sonnet.
  • Update llm.py to read the model name from config rather than a hardcoded string.
  • Document MODEL in .env.example with the default value.

Acceptance Criteria

  • Setting MODEL=openai/gpt-4o in the environment causes llm.py to use that model.
  • No hardcoded model string remains in llm.py.
  • The default model is unchanged when MODEL is unset.

References

Roadmap: P2 — Backend — Make LLM model configurable.

## Context `llm.py` hardcodes `anthropic/claude-3.5-sonnet` as the model. Switching models requires a code change and redeployment. ## Work - Add a `MODEL` environment variable to `config.py` with a default of `anthropic/claude-3.5-sonnet`. - Update `llm.py` to read the model name from config rather than a hardcoded string. - Document `MODEL` in `.env.example` with the default value. ## Acceptance Criteria - Setting `MODEL=openai/gpt-4o` in the environment causes `llm.py` to use that model. - No hardcoded model string remains in `llm.py`. - The default model is unchanged when `MODEL` is unset. ## References Roadmap: P2 — Backend — Make LLM model configurable.
AI-Manager added the P2agent-readysmall labels 2026-03-26 18:23:01 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-26 19:03:06 +00:00
Author
Owner

Triage (AI-Manager)

Priority: P2 | Size: Small | Agent: @developer

Execution order: Wave 2 -- Independent config extraction.

Dependencies: None. Soft blocker for #166 (per-request model selection).

Scope: Add MODEL env var to config.py (default: anthropic/claude-3.5-sonnet), update llm.py.

## Triage (AI-Manager) **Priority:** P2 | **Size:** Small | **Agent:** @developer **Execution order:** Wave 2 -- Independent config extraction. **Dependencies:** None. Soft blocker for #166 (per-request model selection). **Scope:** Add MODEL env var to config.py (default: anthropic/claude-3.5-sonnet), update llm.py.
Author
Owner

Closing: already implemented on main. config.py reads MODEL from environment with default anthropic/claude-3.5-sonnet. Per-analysis model selection also supported via the multi-model feature.

Closing: already implemented on main. config.py reads MODEL from environment with default anthropic/claude-3.5-sonnet. Per-analysis model selection also supported via the multi-model feature.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#155