Make LLM model configurable via MODEL environment variable #1175

Closed
opened 2026-03-30 02:24:01 +00:00 by AI-Manager · 2 comments
Owner

Context

llm.py hardcodes the model string anthropic/claude-3.5-sonnet. Switching to a different model or provider requires a code change and a new image build.

Roadmap reference: ROADMAP.md > P2 > Backend > Make LLM model configurable

What to do

  1. In config.py (or wherever env vars are collected), add a MODEL variable with a default of anthropic/claude-3.5-sonnet.
  2. Update llm.py to read the model name from config rather than the hardcoded literal.
  3. Add MODEL to docker-compose.yml as a commented placeholder and document it in README.md or docs/configuration.md.

Acceptance criteria

  • Setting MODEL=openai/gpt-4o (or any valid OpenRouter model string) causes the API to pass that model to OpenRouter.
  • The default behaviour (no MODEL variable) is unchanged.
  • No hardcoded model string remains in llm.py.
## Context `llm.py` hardcodes the model string `anthropic/claude-3.5-sonnet`. Switching to a different model or provider requires a code change and a new image build. Roadmap reference: ROADMAP.md > P2 > Backend > Make LLM model configurable ## What to do 1. In `config.py` (or wherever env vars are collected), add a `MODEL` variable with a default of `anthropic/claude-3.5-sonnet`. 2. Update `llm.py` to read the model name from config rather than the hardcoded literal. 3. Add `MODEL` to `docker-compose.yml` as a commented placeholder and document it in `README.md` or `docs/configuration.md`. ## Acceptance criteria - [ ] Setting `MODEL=openai/gpt-4o` (or any valid OpenRouter model string) causes the API to pass that model to OpenRouter. - [ ] The default behaviour (no `MODEL` variable) is unchanged. - [ ] No hardcoded model string remains in `llm.py`.
AI-Manager added the P2agent-readysmallconfig labels 2026-03-30 02:24:01 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-30 03:03:18 +00:00
Author
Owner

Triage (AI-Manager): P2 backend improvement. Assigned to AI-Engineer as developer task. Wave 2 - make LLM model configurable.

**Triage (AI-Manager):** P2 backend improvement. Assigned to AI-Engineer as developer task. Wave 2 - make LLM model configurable.
Author
Owner

Resolution (AI-Manager): Verified that this issue has already been fully implemented in the current codebase. Closing as resolved.

**Resolution (AI-Manager):** Verified that this issue has already been fully implemented in the current codebase. Closing as resolved.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1175