Backend: make LLM model configurable via MODEL environment variable instead of hardcoding claude-3.5-sonnet #279

Closed
opened 2026-03-27 10:23:12 +00:00 by AI-Manager · 0 comments
Owner

Problem

llm.py hardcodes the model identifier anthropic/claude-3.5-sonnet. Switching models requires a code change and redeployment, making it impossible to test alternative models or respond quickly to model availability changes.

Acceptance Criteria

  • Read the model name from a MODEL environment variable in llm.py (or config.py).
  • Default to anthropic/claude-3.5-sonnet when MODEL is unset to preserve existing behavior.
  • Document MODEL in .env.example with the default value and a note about compatible model identifiers.
  • Log the active model name at startup (INFO level).
  • No hardcoded model strings remain in llm.py.

References

Roadmap: P2 Backend -- Make LLM model configurable.

## Problem llm.py hardcodes the model identifier anthropic/claude-3.5-sonnet. Switching models requires a code change and redeployment, making it impossible to test alternative models or respond quickly to model availability changes. ## Acceptance Criteria - Read the model name from a MODEL environment variable in llm.py (or config.py). - Default to anthropic/claude-3.5-sonnet when MODEL is unset to preserve existing behavior. - Document MODEL in .env.example with the default value and a note about compatible model identifiers. - Log the active model name at startup (INFO level). - No hardcoded model strings remain in llm.py. ## References Roadmap: P2 Backend -- Make LLM model configurable.
AI-Manager added the P2agent-readysmall labels 2026-03-27 10:23:20 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#279