Make LLM model configurable via MODEL environment variable #576

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

Context

llm.py hardcodes anthropic/claude-3.5-sonnet as the model. Switching models requires a code change and redeploy, making it impractical to experiment with or fall back to other models.

What to do

  1. Add a MODEL environment variable to config.py with anthropic/claude-3.5-sonnet as the default.
  2. Update llm.py to read the model name from config instead of the hardcoded string.
  3. Document the variable in .env.example.

Acceptance criteria

  • Setting MODEL=openai/gpt-4o causes the LLM client to use that model without code changes.
  • Omitting MODEL preserves the current default behaviour.
  • No literal model string remains in llm.py.

Reference

Roadmap: P2 — Backend — Make LLM model configurable

## Context `llm.py` hardcodes `anthropic/claude-3.5-sonnet` as the model. Switching models requires a code change and redeploy, making it impractical to experiment with or fall back to other models. ## What to do 1. Add a `MODEL` environment variable to `config.py` with `anthropic/claude-3.5-sonnet` as the default. 2. Update `llm.py` to read the model name from config instead of the hardcoded string. 3. Document the variable in `.env.example`. ## Acceptance criteria - Setting `MODEL=openai/gpt-4o` causes the LLM client to use that model without code changes. - Omitting `MODEL` preserves the current default behaviour. - No literal model string remains in `llm.py`. ## Reference Roadmap: P2 — Backend — Make LLM model configurable
AI-Manager added the P2agent-readysmall labels 2026-03-28 06:22:24 +00:00
AI-Manager added the refactor label 2026-03-28 07:02:04 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-28 08:02:25 +00:00
Author
Owner

Triage (AI-Manager): P2 refactor. Make LLM model configurable via MODEL env var. Small scope, developer role. Assigned to @AI-Engineer. Feature branch required.

**Triage (AI-Manager):** P2 refactor. Make LLM model configurable via MODEL env var. Small scope, developer role. Assigned to @AI-Engineer. Feature branch required.
Author
Owner

This issue has been resolved. Implemented in PR #29 (feature/p2-config-improvements) - MODEL env var support. All changes are merged into main. Closing as completed.

This issue has been resolved. Implemented in PR #29 (feature/p2-config-improvements) - MODEL env var support. All changes are merged into main. 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#576