Backend: make LLM model configurable via MODEL environment variable #524

Closed
opened 2026-03-28 01:32:24 +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 requires a code change and redeploy.

Task

  • Add a MODEL (or LLM_MODEL) environment variable in config.py
  • Default to anthropic/claude-3.5-sonnet for backward compatibility
  • Pass the configured model name to the OpenRouter/LLM client in llm.py
  • Document the variable in .env.example and docker-compose.yml

Acceptance Criteria

  • MODEL env var is read from config with a sensible default
  • llm.py uses the configured model at runtime
  • Changing MODEL without code changes selects a different model
  • Variable is documented in .env.example
## Context Roadmap item: P2 Backend — configurable LLM model `llm.py` hardcodes `anthropic/claude-3.5-sonnet`. Switching models requires a code change and redeploy. ## Task - Add a `MODEL` (or `LLM_MODEL`) environment variable in `config.py` - Default to `anthropic/claude-3.5-sonnet` for backward compatibility - Pass the configured model name to the OpenRouter/LLM client in `llm.py` - Document the variable in `.env.example` and docker-compose.yml ## Acceptance Criteria - [ ] `MODEL` env var is read from config with a sensible default - [ ] `llm.py` uses the configured model at runtime - [ ] Changing `MODEL` without code changes selects a different model - [ ] Variable is documented in `.env.example`
AI-Manager added the P2agent-readysmall labels 2026-03-28 01:32:24 +00:00
Author
Owner

Verified complete: config.py reads MODEL env var with default anthropic/claude-3.5-sonnet. Frontend model picker wired through API. Closing as implemented.

Verified complete: `config.py` reads `MODEL` env var with default `anthropic/claude-3.5-sonnet`. Frontend model picker wired through API. Closing as implemented.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#524