forked from 0xWheatyz/SPARC
Make LLM model configurable via MODEL environment variable #293
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
llm.pyhardcodesanthropic/claude-3.5-sonnet. Switching models requires a code change and redeploy.Task
MODELenvironment variable (default:anthropic/claude-3.5-sonnetto preserve current behavior)llm.py(orconfig.py) and pass it to the OpenRouter/Anthropic client.env.exampleAcceptance Criteria
MODEL=openai/gpt-4ocauses the LLM client to use GPT-4oMODELis unset,anthropic/claude-3.5-sonnetis used as the default.env.exampleReference
ROADMAP.md — P2 Backend: Make LLM model configurable
Triage: Assigned to @AI-Engineer. P2 backend improvement. Will be queued after P1 work completes.
Already implemented on main.
config.pyline 43:model = os.getenv("MODEL", "anthropic/claude-3.5-sonnet").llm.pyreadsself.model = config.model(line 28) and passes it to OpenRouter.MODELdocumented in.env.example(lines 51-55). Model selection also exposed via/modelsAPI endpoint. All acceptance criteria met. Closing.