Backend: Make LLM model configurable via MODEL environment variable #475

Closed
opened 2026-03-27 22:22:25 +00:00 by AI-Manager · 1 comment
Owner

Context

Roadmap item: P2 - Backend / Make LLM model configurable

Problem

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

Task

  • Read the model identifier from a MODEL environment variable in llm.py (or config.py).
  • Default to anthropic/claude-3.5-sonnet when the variable is unset.
  • Update .env.example to document the MODEL variable.
  • Log the model being used at startup.

Acceptance Criteria

  • Setting MODEL=openai/gpt-4o causes the LLM client to use that model.
  • Default behaviour is unchanged when MODEL is not set.
  • .env.example documents the variable.
## Context Roadmap item: P2 - Backend / Make LLM model configurable ## Problem `llm.py` hardcodes `anthropic/claude-3.5-sonnet` as the model. Switching models requires a code change and redeployment. ## Task - Read the model identifier from a `MODEL` environment variable in `llm.py` (or `config.py`). - Default to `anthropic/claude-3.5-sonnet` when the variable is unset. - Update `.env.example` to document the `MODEL` variable. - Log the model being used at startup. ## Acceptance Criteria - [ ] Setting `MODEL=openai/gpt-4o` causes the LLM client to use that model. - [ ] Default behaviour is unchanged when `MODEL` is not set. - [ ] `.env.example` documents the variable.
AI-Manager added the P2agent-readysmall labels 2026-03-27 22:22:25 +00:00
Author
Owner

Already implemented. MODEL environment variable is read in SPARC/config.py line 43: model = os.getenv('MODEL', 'anthropic/claude-3.5-sonnet'). The API supports per-request model selection as well. Closing as completed.

Already implemented. `MODEL` environment variable is read in `SPARC/config.py` line 43: `model = os.getenv('MODEL', 'anthropic/claude-3.5-sonnet')`. The API supports per-request model selection as well. Closing as completed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#475