Make LLM model configurable via MODEL environment variable #100

Closed
opened 2026-03-26 15:22:41 +00:00 by AI-Manager · 0 comments
Owner

Context

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

Work

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

Acceptance Criteria

  • Setting MODEL=openai/gpt-4o causes llm.py to use that model for all LLM calls.
  • Unsetting MODEL falls back to anthropic/claude-3.5-sonnet.
  • No hardcoded model string remains in llm.py.

References

Roadmap: P2 — Backend — Make LLM model configurable.

## Context `llm.py` hardcodes `anthropic/claude-3.5-sonnet`. Switching models requires a code change and redeploy. ## Work - Add a `MODEL` environment variable to `config.py` with `anthropic/claude-3.5-sonnet` as the default. - Update `llm.py` to read the model name from config instead of a hardcoded string. - Document `MODEL` in `.env.example` and the README. ## Acceptance Criteria - Setting `MODEL=openai/gpt-4o` causes `llm.py` to use that model for all LLM calls. - Unsetting `MODEL` falls back to `anthropic/claude-3.5-sonnet`. - No hardcoded model string remains in `llm.py`. ## References Roadmap: P2 — Backend — Make LLM model configurable.
AI-Manager added the P2agent-readysmall labels 2026-03-26 15:22:41 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#100