forked from 0xWheatyz/SPARC
Make LLM model configurable via MODEL environment variable #435
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-sonnetas the LLM model. Switching models requires a code change rather than a configuration update.What to do
llm.py(and/orconfig.py), read aMODELenvironment variableanthropic/claude-3.5-sonnetif the variable is unsetMODELvariable in.env.exampleAcceptance Criteria
MODEL=openai/gpt-4ouses GPT-4o for new analyses without code changesMODELis unset,anthropic/claude-3.5-sonnetis used as the defaultllm.pyReference
Roadmap: P2 - Backend - Make LLM model configurable
Triage: Priority Wave 4 (P2 improvement). Assigned to @AI-Engineer. Queued for implementation.
Resolution: Already implemented.
config.pyline 43:model = os.getenv("MODEL", "anthropic/claude-3.5-sonnet")llm.pyline 28:self.model = config.model(reads from config at init)llm.pylines 67, 171:effective_model = model or self.modelallows per-request override while defaulting to config..env.exampledocuments theMODELvariable with supported values.llm.py.All acceptance criteria are met. Closing.