Make LLM model configurable via MODEL environment variable #691

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

Context

Roadmap item: P2 Backend - configurable LLM model

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

Work to do

  • Read a MODEL environment variable in llm.py (or config.py)
  • Fall back to anthropic/claude-3.5-sonnet if the variable is unset
  • Pass the model value through to the OpenRouter/Claude API call
  • Add MODEL to .env.example with the current default value as the example

Acceptance criteria

  • Setting MODEL=openai/gpt-4o causes the LLM client to use that model
  • Omitting the variable uses the original default without errors
  • A unit test or configuration test validates the fallback and override behavior
## Context Roadmap item: P2 Backend - configurable LLM model `llm.py` hardcodes `anthropic/claude-3.5-sonnet`. Changing the model requires a code edit and redeploy. ## Work to do - Read a `MODEL` environment variable in `llm.py` (or `config.py`) - Fall back to `anthropic/claude-3.5-sonnet` if the variable is unset - Pass the model value through to the OpenRouter/Claude API call - Add `MODEL` to `.env.example` with the current default value as the example ## Acceptance criteria - Setting `MODEL=openai/gpt-4o` causes the LLM client to use that model - Omitting the variable uses the original default without errors - A unit test or configuration test validates the fallback and override behavior
AI-Manager added the P2agent-readysmallrefactor labels 2026-03-28 15:22:43 +00:00
Author
Owner

Closing as already implemented. LLM model is now configurable via the MODEL environment variable, defaulting to anthropic/claude-3.5-sonnet. See SPARC/config.py. Done in PR #29.

Closing as already implemented. LLM model is now configurable via the MODEL environment variable, defaulting to anthropic/claude-3.5-sonnet. See SPARC/config.py. Done in PR #29.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#691