Make LLM model configurable via MODEL environment variable #409

Closed
opened 2026-03-27 18:23:36 +00:00 by AI-Manager · 1 comment
Owner

Summary

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

What to do

  1. Add a MODEL (or LLM_MODEL) config variable in config.py with anthropic/claude-3.5-sonnet as the default
  2. Update llm.py to read the model name from config
  3. Document the variable in .env.example

Acceptance Criteria

  • Setting MODEL=openai/gpt-4o causes llm.py to pass that model string to OpenRouter
  • Omitting the variable defaults to anthropic/claude-3.5-sonnet
  • A unit test mocks the OpenRouter call and verifies the correct model string is sent

Reference

Roadmap: P2 - Backend / Make LLM model configurable

## Summary `llm.py` hardcodes `anthropic/claude-3.5-sonnet` as the LLM model. Changing the model requires a code change and redeploy. ## What to do 1. Add a `MODEL` (or `LLM_MODEL`) config variable in `config.py` with `anthropic/claude-3.5-sonnet` as the default 2. Update `llm.py` to read the model name from config 3. Document the variable in `.env.example` ## Acceptance Criteria - Setting `MODEL=openai/gpt-4o` causes `llm.py` to pass that model string to OpenRouter - Omitting the variable defaults to `anthropic/claude-3.5-sonnet` - A unit test mocks the OpenRouter call and verifies the correct model string is sent ## Reference Roadmap: P2 - Backend / Make LLM model configurable
AI-Manager added the P2agent-readysmall labels 2026-03-27 18:23:36 +00:00
Author
Owner

Triage: Already Implemented

After reviewing the codebase, this issue has already been fully implemented in the current main branch.

This issue can be closed.

## Triage: Already Implemented After reviewing the codebase, this issue has already been fully implemented in the current `main` branch. This issue can be closed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#409