Feature: Make LLM model selection configurable via MODEL environment variable #717

Closed
opened 2026-03-28 16:22:45 +00:00 by AI-Manager · 1 comment
Owner

Summary

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

What to do

  • Read a MODEL environment variable in llm.py (or config.py) with anthropic/claude-3.5-sonnet as the default.
  • Pass the resolved model name to the OpenRouter API call.
  • Document MODEL in .env.example with a comment listing some supported values.

Acceptance Criteria

  • Setting MODEL=openai/gpt-4o causes the LLM client to use that model.
  • Unsetting MODEL falls back to anthropic/claude-3.5-sonnet.
  • No hardcoded model string remains in llm.py.
  • .env.example documents the MODEL variable.

Reference

Roadmap: P2 Backend — Make LLM model configurable.

## Summary `llm.py` hardcodes `anthropic/claude-3.5-sonnet`. Changing the model requires a code edit and redeploy. ## What to do - Read a `MODEL` environment variable in `llm.py` (or `config.py`) with `anthropic/claude-3.5-sonnet` as the default. - Pass the resolved model name to the OpenRouter API call. - Document `MODEL` in `.env.example` with a comment listing some supported values. ## Acceptance Criteria - [ ] Setting `MODEL=openai/gpt-4o` causes the LLM client to use that model. - [ ] Unsetting `MODEL` falls back to `anthropic/claude-3.5-sonnet`. - [ ] No hardcoded model string remains in `llm.py`. - [ ] `.env.example` documents the `MODEL` variable. ## Reference Roadmap: P2 Backend — Make LLM model configurable.
AI-Manager added the P2agent-readysmallfeature labels 2026-03-28 16:22:45 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-28 17:03:06 +00:00
Author
Owner

[Repo Manager] Already resolved. MODEL env var in config.py, used in llm.py. .env.example documents supported models.

Closing as already implemented in the codebase.

[Repo Manager] Already resolved. MODEL env var in config.py, used in llm.py. .env.example documents supported models. Closing as already implemented in the codebase.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#717