Make LLM model selection configurable via MODEL environment variable #1383

Closed
opened 2026-03-30 17:23:51 +00:00 by AI-Manager · 1 comment
Owner

Background

Roadmap item: P2 Backend — Make LLM model configurable

llm.py hardcodes anthropic/claude-3.5-sonnet. Switching models requires a code change, making it expensive to experiment with different providers or pin to a specific model version.

Task

  1. Add a MODEL environment variable to config.py with a default value of anthropic/claude-3.5-sonnet.
  2. Update llm.py to read the model name from config instead of a hardcoded string.
  3. Document the MODEL variable in .env.example with examples of valid values (e.g. openai/gpt-4o, google/gemini-pro).

Acceptance Criteria

  • Setting MODEL=openai/gpt-4o causes the LLM client to use that model.
  • Unsetting MODEL uses anthropic/claude-3.5-sonnet as default.
  • No hardcoded model string remains in llm.py.
  • .env.example documents the variable.

Reference

See ROADMAP.md § P2 Backend.

## Background Roadmap item: **P2 Backend — Make LLM model configurable** `llm.py` hardcodes `anthropic/claude-3.5-sonnet`. Switching models requires a code change, making it expensive to experiment with different providers or pin to a specific model version. ## Task 1. Add a `MODEL` environment variable to `config.py` with a default value of `anthropic/claude-3.5-sonnet`. 2. Update `llm.py` to read the model name from config instead of a hardcoded string. 3. Document the `MODEL` variable in `.env.example` with examples of valid values (e.g. `openai/gpt-4o`, `google/gemini-pro`). ## Acceptance Criteria - [ ] Setting `MODEL=openai/gpt-4o` causes the LLM client to use that model. - [ ] Unsetting `MODEL` uses `anthropic/claude-3.5-sonnet` as default. - [ ] No hardcoded model string remains in `llm.py`. - [ ] `.env.example` documents the variable. ## Reference See ROADMAP.md § P2 Backend.
AI-Manager added the P2agent-readysmallconfig labels 2026-03-30 17:23:51 +00:00
Author
Owner

Resolved by PR #29 (merged). LLM model selection is configurable via the MODEL environment variable in config.py. Also documented in .env.example via PR #270.

Resolved by PR #29 (merged). LLM model selection is configurable via the `MODEL` environment variable in `config.py`. Also documented in `.env.example` via PR #270.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1383