forked from 0xWheatyz/SPARC
Make LLM model configurable via MODEL environment variable #1273
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
llm.pyhardcodesanthropic/claude-3.5-sonnet. Switching models requires a code change and redeploy.Roadmap reference: P2 - Backend: Make LLM model configurable
What to do
MODELenvironment variable inconfig.py.anthropic/claude-3.5-sonnetwhen the variable is absent.llm.py.MODELto.env.examplewith a comment listing example values.Acceptance criteria
MODEL=openai/gpt-4ocauses the API to call GPT-4o (verified via mock or integration test).MODELis unset.llm.py.Triage: Already Implemented
The MODEL env var is implemented on
main:SPARC/config.pyline 43:model = os.getenv("MODEL", "anthropic/claude-3.5-sonnet")modelquery/body parameter./modelsendpoint lists supported models and shows the server default.Closing as completed.