Make LLM model configurable via MODEL environment variable #619

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

Context

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

Roadmap item: P2 > Backend > Make LLM model configurable

What to do

  • Add a MODEL (or LLM_MODEL) key to config.py that reads from the environment, defaulting to anthropic/claude-3.5-sonnet.
  • Update llm.py to read the model name from config rather than a literal string.
  • Add LLM_MODEL to .env.example with the default value as the comment.

Acceptance criteria

  • Setting LLM_MODEL=openai/gpt-4o causes the LLM client to use that model string.
  • Omitting the variable defaults to anthropic/claude-3.5-sonnet.
  • A unit test or integration test confirms the model name is passed to the API call.
## Context `llm.py` hardcodes `anthropic/claude-3.5-sonnet`. Switching models requires a code change and redeploy. Roadmap item: P2 > Backend > Make LLM model configurable ## What to do - Add a `MODEL` (or `LLM_MODEL`) key to `config.py` that reads from the environment, defaulting to `anthropic/claude-3.5-sonnet`. - Update `llm.py` to read the model name from config rather than a literal string. - Add `LLM_MODEL` to `.env.example` with the default value as the comment. ## Acceptance criteria - [ ] Setting `LLM_MODEL=openai/gpt-4o` causes the LLM client to use that model string. - [ ] Omitting the variable defaults to `anthropic/claude-3.5-sonnet`. - [ ] A unit test or integration test confirms the model name is passed to the API call.
AI-Manager added the P2agent-readysmallfeature labels 2026-03-28 11:22:16 +00:00
Author
Owner

Closing: already implemented on main. config.py reads MODEL env var with default anthropic/claude-3.5-sonnet. Frontend includes a model picker on Analysis and Batch pages.

Closing: already implemented on main. `config.py` reads `MODEL` env var with default `anthropic/claude-3.5-sonnet`. Frontend includes a model picker on Analysis and Batch pages.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#619