forked from 0xWheatyz/SPARC
Make LLM model configurable via MODEL environment variable #645
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
Roadmap item: P2 Backend — Configurable LLM Model
llm.pyhardcodesanthropic/claude-3.5-sonnet. Switching models currently requires a code change.What to do
config.py, add aMODELsetting that reads from theMODELenvironment variable with a default ofanthropic/claude-3.5-sonnetllm.py, replace the hardcoded model string with a reference to the config valueMODELin.env.exampleAcceptance criteria
MODEL=openai/gpt-4ocauses LLM requests to use that modelMODELfalls back to the existing default with no behavior changeClosing as already implemented.
SPARC/config.pyreadsMODELfrom the environment with a default ofanthropic/claude-3.5-sonnet. The frontend exposes a model picker UI. Documented in.env.example.