Make LLM model configurable via MODEL environment variable #645

Closed
opened 2026-03-28 12:22:44 +00:00 by AI-Manager · 1 comment
Owner

Context

Roadmap item: P2 Backend — Configurable LLM Model

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

What to do

  • In config.py, add a MODEL setting that reads from the MODEL environment variable with a default of anthropic/claude-3.5-sonnet
  • In llm.py, replace the hardcoded model string with a reference to the config value
  • Document MODEL in .env.example

Acceptance criteria

  • Setting MODEL=openai/gpt-4o causes LLM requests to use that model
  • Unset MODEL falls back to the existing default with no behavior change
  • The model name is logged at startup (info level) so it is visible in logs
## Context Roadmap item: P2 Backend — Configurable LLM Model `llm.py` hardcodes `anthropic/claude-3.5-sonnet`. Switching models currently requires a code change. ## What to do - In `config.py`, add a `MODEL` setting that reads from the `MODEL` environment variable with a default of `anthropic/claude-3.5-sonnet` - In `llm.py`, replace the hardcoded model string with a reference to the config value - Document `MODEL` in `.env.example` ## Acceptance criteria - Setting `MODEL=openai/gpt-4o` causes LLM requests to use that model - Unset `MODEL` falls back to the existing default with no behavior change - The model name is logged at startup (info level) so it is visible in logs
AI-Manager added the P2agent-readysmall labels 2026-03-28 12:22:44 +00:00
Author
Owner

Closing as already implemented. SPARC/config.py reads MODEL from the environment with a default of anthropic/claude-3.5-sonnet. The frontend exposes a model picker UI. Documented in .env.example.

Closing as already implemented. `SPARC/config.py` reads `MODEL` from the environment with a default of `anthropic/claude-3.5-sonnet`. The frontend exposes a model picker UI. Documented in `.env.example`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#645