Parent
Part of #542 — Multi-provider LLM support
Depends on
#544 — env var wiring must work first
What
Add --llm-provider and --llm-model CLI flags so users can select provider and model per-run without setting environment variables.
Files to modify
codeframe/cli/app.py — add flags to work_start and work_batch_run commands
codeframe/core/conductor.py — pass provider/model through BatchRun
codeframe/core/runtime.py — accept provider/model params, pass to get_provider()
tests/ — CLI integration tests for new flags
Implementation notes
cf work start:
cf work start <task-id> --execute \
--llm-provider openai \
--llm-model qwen2.5-coder:7b
cf work batch run:
cf work batch run --all-ready \
--llm-provider openai \
--llm-model gpt-4o
Flag defaults: None — falls back to CODEFRAME_LLM_PROVIDER env var, then anthropic.
BatchRun model update: Add llm_provider: str | None = None and llm_model: str | None = None fields to the BatchRun dataclass.
Priority order for provider selection:
- CLI flag (
--llm-provider)
- Env var (
CODEFRAME_LLM_PROVIDER)
- Default:
anthropic
Help text example:
--llm-provider LLM provider: anthropic, openai (default: anthropic or $CODEFRAME_LLM_PROVIDER)
--llm-model Model name for the chosen provider (default: provider's recommended model)
Examples: claude-sonnet-4-5, gpt-4o, qwen2.5-coder:7b, deepseek-coder
Acceptance criteria
Parent
Part of #542 — Multi-provider LLM support
Depends on
#544 — env var wiring must work first
What
Add
--llm-providerand--llm-modelCLI flags so users can select provider and model per-run without setting environment variables.Files to modify
codeframe/cli/app.py— add flags towork_startandwork_batch_runcommandscodeframe/core/conductor.py— pass provider/model throughBatchRuncodeframe/core/runtime.py— accept provider/model params, pass toget_provider()tests/— CLI integration tests for new flagsImplementation notes
cf work start:cf work batch run:Flag defaults:
None— falls back toCODEFRAME_LLM_PROVIDERenv var, thenanthropic.BatchRunmodel update: Addllm_provider: str | None = Noneandllm_model: str | None = Nonefields to theBatchRundataclass.Priority order for provider selection:
--llm-provider)CODEFRAME_LLM_PROVIDER)anthropicHelp text example:
Acceptance criteria
cf work start <id> --execute --llm-provider openai --llm-model gpt-4oworkscf work batch run --all-ready --llm-provider openaiworkscf --helpshows new flags with clear descriptions