forked from 0xWheatyz/SPARC
Make LLM model configurable via MODEL environment variable #788
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.pyhardcodes the model stringanthropic/claude-3.5-sonnet. Switching models requires a code change and image rebuild, which is impractical for experimentation or cost optimisation.Roadmap reference: ROADMAP.md -- P2 Backend -- "Make LLM model configurable"
What to do
MODELconfig entry inconfig.pyreading from the environment, defaulting toanthropic/claude-3.5-sonnet.llm.py, replace the hardcoded string withconfig.MODEL..env.exampleto document the variable.Acceptance criteria
MODEL=openai/gpt-4ocausesllm.pyto use that model string in API calls without code changes.llm.py.Triage: Assigned to @developer. Reason: P2 feature, small - env var config change.
Already implemented -- closing.
The LLM model is configurable via the
MODELenvironment variable inSPARC/config.py(line 43), defaulting toanthropic/claude-3.5-sonnet. Additionally, analysis endpoints accept an optionalmodelparameter for per-request overrides. The/modelsendpoint lists supported models and shows the current default.No further work needed.