Skip to content

fix(workflow): complete model selection for ai.summarize and builtin templates#434

Merged
zhubert merged 1 commit intomainfrom
fix/model-selection-completeness
Mar 16, 2026
Merged

fix(workflow): complete model selection for ai.summarize and builtin templates#434
zhubert merged 1 commit intomainfrom
fix/model-selection-completeness

Conversation

@zhubert
Copy link
Copy Markdown
Owner

@zhubert zhubert commented Mar 16, 2026

Summary

Test plan

  • TestStartSummarize_SetsModel — verifies model flows through to runner for ai.summarize
  • TestExpandTemplates_BuiltinModelParam — table-driven test covering all 5 AI templates with default (empty) and override behavior
  • Full test suite passes (go test -p=1 -count=1 ./...)
  • staticcheck, go vet, goimports all clean

🤖 Generated with Claude Code

…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>
Copilot AI review requested due to automatic review settings March 16, 2026 13:37
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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(...) in startSummarize() 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 a model param 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.

@zhubert zhubert merged commit c51b610 into main Mar 16, 2026
5 checks passed
@zhubert zhubert deleted the fix/model-selection-completeness branch March 16, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants