forked from 0xWheatyz/SPARC
Make LLM model configurable via MODEL environment variable #1428
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?
Summary
llm.pyhardcodesanthropic/claude-3.5-sonnet. Switching models requires a code change.What to do
MODELkey toconfig.pythat reads from theMODELenvironment variable.anthropic/claude-3.5-sonnetwhen unset.llm.py..env.example.Acceptance criteria
MODEL=openai/gpt-4ocauses requests to use that model.MODELpreserves existing Claude behavior.llm.py.References
Roadmap: P2 Backend -- configurable LLM model.
Already implemented.
SPARC/config.pyreadsMODELfrom the environment:model = os.getenv("MODEL", "anthropic/claude-3.5-sonnet"). TheLLMAnalyzerusesconfig.modelas its default, and per-request model overrides are supported via the API.Closing as completed.