forked from 0xWheatyz/SPARC
Backend: Make LLM model configurable via MODEL environment variable #475
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
Problem
llm.pyhardcodesanthropic/claude-3.5-sonnetas the model. Switching models requires a code change and redeployment.Task
MODELenvironment variable inllm.py(orconfig.py).anthropic/claude-3.5-sonnetwhen the variable is unset..env.exampleto document theMODELvariable.Acceptance Criteria
MODEL=openai/gpt-4ocauses the LLM client to use that model.MODELis not set..env.exampledocuments the variable.Already implemented.
MODELenvironment variable is read inSPARC/config.pyline 43:model = os.getenv('MODEL', 'anthropic/claude-3.5-sonnet'). The API supports per-request model selection as well. Closing as completed.