feat: add per-phase Claude model configuration (claude_model + review_model)#272
Open
dwilberger wants to merge 1 commit intoumputun:masterfrom
Open
feat: add per-phase Claude model configuration (claude_model + review_model)#272dwilberger wants to merge 1 commit intoumputun:masterfrom
dwilberger wants to merge 1 commit intoumputun:masterfrom
Conversation
Add claude_model and review_model config parameters to control which Claude model is used for task execution vs review phases. This allows using a more capable model (e.g., opus) for tasks while using a faster model (e.g., sonnet) for review iterations, reducing cost on review-heavy runs. - Add Model field to ClaudeExecutor, injecting --model flag when set - Create separate review executor when review_model differs - Add --claude-model and --review-model CLI flags - Empty values preserve current behavior (no --model flag) Closes umputun#271
umputun
requested changes
Apr 5, 2026
Owner
umputun
left a comment
There was a problem hiding this comment.
nice feature, thx. couple things to address:
- naming -
claude_modelis misleading, it only applies to task/planning phases, not to claude globally.task_modelwould be more accurate and symmetric withreview_model. same for the CLI flag ---task-model/--review-modelreads better than--claude-model/--review-model - config comment typo -
pkg/config/defaults/config:33says# claude_model =but should be# review_model = - custom wrappers -
--modelflag is silently ignored by custom providers (claude_commandconfig). not a bug, but worth documenting that model config only applies with the default Claude CLI - missing processor test - the
ReviewClaudeexecutor separation logic inrunner.gohas no test coverage. existing tests only exercise the fallback path (ReviewClaude: nil). a test with distinct task/review mock executors verifying the review phase calls the right one would close this gap - no docs update - README, CLAUDE.md, and llms.txt document all config options but don't mention the new fields or CLI flags
the approach itself is clean - separate executor only when models differ, correct config merge chain, backward compatible. no scope creep, tests pass, linter clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
claude_modelandreview_modelconfig parameters to control which Claude model is used for task execution vs review phases--claude-modeland--review-modelCLI flags with standard precedence (CLI > local config > global config > default)review_modeldiffers fromclaude_model, used by all review phases (first review, fix loops, codex eval, finalize)--modelflag passed to Claude CLI)Motivation
Review phases run 5-7 parallel Claude agents that can iterate multiple times. Using the same model (e.g., Opus) for both tasks and reviews is unnecessarily expensive. This change allows using a capable model for tasks while using a faster/cheaper model for reviews.
Usage
# or via CLI flags ralphex --claude-model opus --review-model sonnet docs/plans/sprint-1.mdTest plan
claude_modelandreview_modelparsed from INI--modelflag injected when Model is set, absent when emptygo build ./...passesCloses #271