Split Claude code model into separate initial/review models and efforts - #228
Conversation
There was a problem hiding this comment.
Pull request overview
This PR splits the single Claude “code model” configuration into distinct initial implementation vs review models and reasoning efforts, and wires those through the agent client and orchestration so each phase can be tuned independently.
Changes:
- Replace
claude_code_modelwithclaude_code_initial_model/claude_code_review_modeland addclaude_code_initial_effort/claude_code_review_effort, including precedence/default behavior. - Update Claude agent wiring so implementation flows use the initial model/effort and
selfReviewuses the review model/effort; add--effort <value>handling. - Update orchestration dashboard reporting and docs/examples; add tests to validate wiring and config defaults.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/env-config.test.ts | Updates config tests for new initial/review model+effort keys and precedence. |
| test/claude-agent.test.ts | Adds tests asserting --model/--effort are passed correctly for implementation vs self-review. |
| src/index.ts | Splits per-project config fields and updates dashboard “model” reporting by action type. |
| src/env-config.ts | Replaces claude_code_model with initial/review model+effort fields in config resolution defaults. |
| src/claude-agent.ts | Adds initial/review model+effort options and passes --effort to the Claude CLI. |
| README.md | Updates environment-variable documentation row to mention new config keys. |
| env.example.yaml | Updates example config to the new initial/review model+effort keys. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| claude_code_initial_model: | ||
| projectConfig.claude_code_initial_model ?? | ||
| globalConfig.claude_code_initial_model ?? | ||
| "claude-sonnet-4-6", | ||
| claude_code_review_model: | ||
| projectConfig.claude_code_review_model ?? | ||
| globalConfig.claude_code_review_model ?? | ||
| "claude-opus-4-8", |
| | `MAX_CONCURRENCY` | `3` | Maximum active work items across open PRs and in-flight implementations. | | ||
| | `CYCLE_MINIMUM_SECONDS` | `60` | Minimum seconds between engine cycle starts. | | ||
| | `CLAUDE_MODEL` | *(Claude default)* | Claude model for implementation and review (e.g. `claude-sonnet-4-6`). | | ||
| | `CLAUDE_MODEL` | *(Claude default)* | Claude model for implementation and review (e.g. `claude-sonnet-4-6`). Split in `env.yaml` into `claude_code_initial_model` (default `claude-sonnet-4-6`) and `claude_code_review_model` (default `claude-opus-4-8`), with `claude_code_initial_effort` and `claude_code_review_effort` (both default `high`). | |
…ration Existing env.yaml files that still contain `claude_code_model` (global or per-project) would otherwise be silently ignored and fall back to the new defaults, making misconfiguration hard to diagnose. Throwing a targeted error with a migration message makes the breakage visible immediately. Adds tests for both the global and per-project error paths. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…eviewModel does claudeReviewModel already falls back to claudeInitialModel when unset, but claudeReviewEffort did not fall back to claudeInitialEffort, making the options API inconsistent and causing selfReview() to omit --effort even when an initial effort was set programmatically. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…eading CLAUDE_MODEL row CLAUDE_MODEL is not an environment variable read by Vibrator — models and efforts are sourced exclusively from env.yaml. Keeping it in the env vars table implied it was a real knob, misleading users who might set it and see no effect. Removed the row and added a dedicated env.yaml model configuration table below the env vars section. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Reviewed code and pushed fixes. I read and addressed the comment from @copilot (#228 (comment)): Added explicit checks in |
|
Reviewed code, no issues found. I read and addressed the comment from @copilot-pull-request-reviewer[bot] (#228 (review)): The Copilot bot comment is an informational overview confirming all 7 files were reviewed; it raised 3 inline comments (not included in the review payload) but the overview itself requests no specific changes. All 378 tests pass, all issue #227 requirements are implemented correctly, and no code changes were needed. |
|
Reviewed code, no issues found. I read and addressed the comment from @copilot-pull-request-reviewer[bot] (#228 (review)): The Copilot bot provided an overview summary noting it reviewed all 7 files and generated 3 inline comments (not visible here), but raised no specific concerns in the summary text. All tests pass (378/378), the implementation fully satisfies issue #227 requirements, and no action was required in response to this comment. |
Summary
Replaces the single
claude_code_modelconfig with distinct models and reasoning efforts for implementation and review phases, enabling independent tuning of each phase.What changed
Config (
env-config.ts):claude_code_modelclaude_code_initial_model(defaultclaude-sonnet-4-6) andclaude_code_review_model(defaultclaude-opus-4-8)claude_code_initial_effortandclaude_code_review_effort(both defaulthigh)applyProjectDefaultsAgent wiring (
claude-agent.ts):implementIssueand follow-up flows (conflict resolution, failing-check fixes, push-conflict resolution) use the initial model + effortselfReviewuses the review model + effortrunClaudenow accepts aneffortOverrideparameter and passes--effort <value>to the CLIOrchestration (
index.ts):modelfield now reports the review model forself-reviewactions and the initial model for othersDocumentation:
env.example.yamland README env table with new config keysWhy
This split allows for phase-specific optimization:
Testing
claude_code_modelin global and project contexts throws with clear messagesCloses #227