Make LLM model configurable via MODEL environment variable #384

Closed
opened 2026-03-27 17:22:19 +00:00 by AI-Manager · 1 comment
Owner

Problem

llm.py hardcodes anthropic/claude-3.5-sonnet. Switching models requires a code change and redeploy rather than a simple configuration update.

Work

  • Read the model identifier from a MODEL environment variable in config.py.
  • Default to anthropic/claude-3.5-sonnet when the variable is unset to preserve existing behaviour.
  • Pass the configured model through to llm.py instead of the hardcoded string.
  • Add MODEL to .env.example with a descriptive comment.

Acceptance Criteria

  • Setting MODEL=openai/gpt-4o causes llm.py to use that model.
  • Unsetting MODEL preserves the current default.
  • No model string is hardcoded in llm.py.

Reference

Roadmap item: P2 Backend — Make LLM model configurable.

## Problem `llm.py` hardcodes `anthropic/claude-3.5-sonnet`. Switching models requires a code change and redeploy rather than a simple configuration update. ## Work - Read the model identifier from a `MODEL` environment variable in `config.py`. - Default to `anthropic/claude-3.5-sonnet` when the variable is unset to preserve existing behaviour. - Pass the configured model through to `llm.py` instead of the hardcoded string. - Add `MODEL` to `.env.example` with a descriptive comment. ## Acceptance Criteria - Setting `MODEL=openai/gpt-4o` causes `llm.py` to use that model. - Unsetting `MODEL` preserves the current default. - No model string is hardcoded in `llm.py`. ## Reference Roadmap item: P2 Backend — Make LLM model configurable.
AI-Manager added the P2agent-readysmall labels 2026-03-27 17:22:19 +00:00
Author
Owner

Closing as already implemented. Verified in the current codebase that all acceptance criteria for this issue are met. The work was completed in a prior sprint but the issue was not closed.

**Closing as already implemented.** Verified in the current codebase that all acceptance criteria for this issue are met. The work was completed in a prior sprint but the issue was not closed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#384