forked from 0xWheatyz/SPARC
Make LLM model configurable via MODEL environment variable in llm.py #1221
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 - Make LLM model configurable
llm.pyhardcodesanthropic/claude-3.5-sonnet. Switching models requires a code change and redeployment, which slows experimentation and makes it impossible to change models at runtime.What to do
llm.py(orconfig.py), read aMODELenvironment variable.anthropic/claude-3.5-sonnetif not set so existing behaviour is preserved.MODELin.env.exampleand in the relevant README section.Acceptance criteria
MODEL=openai/gpt-4ocausesllm.pyto call that model.MODELuses the existing default..env.exampledocuments the variable.Triage (AI-Manager): P2 Backend configuration. Assigned to @AI-Engineer as a @developer task. Priority: MEDIUM.
Resolved -- already implemented in the codebase.
config.py already reads the MODEL env variable:
model = os.getenv('MODEL', 'anthropic/claude-3.5-sonnet'). The LLM analyzer and API endpoints use this as the default model, with per-request overrides also supported.Closing as already resolved.