forked from 0xWheatyz/SPARC
Make LLM model configurable via MODEL environment variable #1408
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. Changing the model requires a code edit and image rebuild.What to do
MODELenvironment variable inllm.py(orconfig.py).anthropic/claude-3.5-sonnetif the variable is unset.MODELto.env.examplewith the default value and a comment.Acceptance criteria
MODEL=openai/gpt-4ocauses the LLM client to use that model.Triage: Already resolved in main.
MODELenvironment variable is implemented inSPARC/config.pyline 43:model = os.getenv("MODEL", "anthropic/claude-3.5-sonnet"). Documented in.env.examplewith supported model examples. Per-request model override is also available via the API request body. Closing as complete.