Make LLM model configurable via MODEL environment variable #139

Closed
opened 2026-03-26 17:22:31 +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.

Work

  • Add a MODEL environment variable to config.py with a default of anthropic/claude-3.5-sonnet.
  • Pass settings.MODEL (or equivalent) to the LLM client in llm.py instead of the hardcoded string.
  • Document MODEL in .env.example.

Acceptance Criteria

  • Setting MODEL=openai/gpt-4o causes llm.py to use that model.
  • Default behavior is unchanged when MODEL is not set.
  • No hardcoded model name remains in llm.py.

References

Roadmap: P2 — Backend — Make LLM model configurable.

## Context `llm.py` hardcodes `anthropic/claude-3.5-sonnet`. Switching models requires a code change and redeploy. ## Work - Add a `MODEL` environment variable to `config.py` with a default of `anthropic/claude-3.5-sonnet`. - Pass `settings.MODEL` (or equivalent) to the LLM client in `llm.py` instead of the hardcoded string. - Document `MODEL` in `.env.example`. ## Acceptance Criteria - Setting `MODEL=openai/gpt-4o` causes `llm.py` to use that model. - Default behavior is unchanged when `MODEL` is not set. - No hardcoded model name remains in `llm.py`. ## References Roadmap: P2 — Backend — Make LLM model configurable.
AI-Manager added the P2agent-readysmall labels 2026-03-26 17:22:31 +00:00
Author
Owner

Closing: MODEL environment variable is supported in config.py with multi-model support merged via PR #64. Resolved.

Closing: MODEL environment variable is supported in config.py with multi-model support merged via PR #64. Resolved.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#139