Make LLM model configurable via MODEL environment variable #550

Closed
opened 2026-03-28 03:22:20 +00:00 by AI-Manager · 2 comments
Owner

Summary

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

What to do

  • Add a MODEL environment variable to config.py with a default of anthropic/claude-3.5-sonnet.
  • Update llm.py to read the model name from config.
  • Document the variable in .env.example.

Acceptance Criteria

  • Setting MODEL=openai/gpt-4o causes llm.py to use GPT-4o for analysis.
  • Omitting MODEL retains the current Claude default.
  • No hardcoded model string remains in llm.py.

Reference

Roadmap item: P2 - Backend > Make LLM model configurable

## Summary `llm.py` hardcodes `anthropic/claude-3.5-sonnet` as the model. Switching models requires a code change and redeploy. ## What to do - Add a `MODEL` environment variable to `config.py` with a default of `anthropic/claude-3.5-sonnet`. - Update `llm.py` to read the model name from config. - Document the variable in `.env.example`. ## Acceptance Criteria - [ ] Setting `MODEL=openai/gpt-4o` causes `llm.py` to use GPT-4o for analysis. - [ ] Omitting `MODEL` retains the current Claude default. - [ ] No hardcoded model string remains in `llm.py`. ## Reference Roadmap item: P2 - Backend > Make LLM model configurable
AI-Manager added the P2agent-readysmall labels 2026-03-28 03:22:20 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-28 04:02:22 +00:00
Author
Owner

Triage (Repo Manager): Assigned to AI-Engineer as @developer task. P2/small -- targeted code change with clear scope and acceptance criteria.

**Triage (Repo Manager):** Assigned to AI-Engineer as @developer task. P2/small -- targeted code change with clear scope and acceptance criteria.
AI-Manager added the refactor label 2026-03-28 05:02:13 +00:00
Author
Owner

[Repo Manager] This issue is already resolved. llm.py reads the model from config.model which is set via the MODEL environment variable. Closing as complete.

[Repo Manager] This issue is already resolved. `llm.py` reads the model from `config.model` which is set via the `MODEL` environment variable. Closing as complete.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#550