Conversation
…templates ai.summarize (added in #432) was missing the SetModel() call that all other AI action handlers received in #431. Also extends the builtin template parameter system so that plan, code, document, ci, and review templates accept a `model` param and pass it through to their AI states. Documents settings.model, per-state model, and template model param in docs/workflow.html. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Completes per-state Claude model selection support by ensuring the ai.summarize action applies the resolved model, and by enabling built-in templates to pass a model parameter through to their AI states (via template expansion), with corresponding documentation updates.
Changes:
- Apply
runner.SetModel(...)instartSummarize()using the same state-model resolution logic as other AI entry points. - Extend template parameter substitution to also replace placeholders in
State.Model, and add amodelparam to all built-in templates that include AI actions. - Add targeted tests for summarize model propagation and for built-in template model param expansion; document the new configuration options.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| internal/workflow/template_test.go | Adds table-driven coverage ensuring built-in templates propagate the model param into expanded AI states. |
| internal/workflow/template.go | Extends template placeholder substitution to apply to State.Model in addition to State.Params. |
| internal/workflow/defaults.go | Adds model as a template param and wires Model: "{{model}}" into AI states in built-in templates (plan/code/document/ci/review). |
| internal/daemon/coding.go | Sets the resolved model in startSummarize() to match other AI action handlers. |
| internal/daemon/actions_test.go | Adds a test asserting ai.summarize resolves aliases and sets the canonical model on the runner. |
| docs/workflow.html | Documents settings.model, per-state model, and built-in template model parameter usage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
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
SetModel()call tostartSummarize()— the only AI action handler that was skipped when model selection was added in feat(workflow): add per-action model selection with config validation #431 (becauseai.summarizewas introduced later in feat(daemon): add ai.summarize action for PR diff summaries #432)state.Modelfield (not juststate.Params), and addmodelas a parameter to all 5 AI-containing builtin templates (plan,code,document,ci,review)settings.model, per-statemodel, and templatemodelparam indocs/workflow.htmlTest plan
TestStartSummarize_SetsModel— verifies model flows through to runner for ai.summarizeTestExpandTemplates_BuiltinModelParam— table-driven test covering all 5 AI templates with default (empty) and override behaviorgo test -p=1 -count=1 ./...)staticcheck,go vet,goimportsall clean🤖 Generated with Claude Code