forked from 0xWheatyz/SPARC
Make LLM model configurable via MODEL environment variable #857
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, making it difficult to test other models or handle upstream model deprecations.Work to do
MODELenvironment variable toconfig.pywith a default ofanthropic/claude-3.5-sonnet.llm.pyto readMODELfrom config and pass it to the OpenRouter/Anthropic API call.docker-compose.ymland.env.exampleto document theMODELvariable.Acceptance criteria
MODEL=openai/gpt-4ocauses that model to be used in LLM calls.MODELis unset.llm.py.Resolved in codebase. SPARC/config.py line 43: model = os.getenv('MODEL', 'anthropic/claude-3.5-sonnet'). Used in SPARC/llm.py and throughout the API. Closing as implemented.