Skip to content

Latest commit

 

History

History
46 lines (35 loc) · 2.19 KB

File metadata and controls

46 lines (35 loc) · 2.19 KB

← Back to Backlog

[SC-019] ✅ DONE - Allow model selection via @claude trigger phrase

Status: Done (2026-03-07) Priority: Medium Component: .github/workflows/claude.yml

Summary: As a repository maintainer, I want to specify the Claude model in my @claude trigger comment so that I can choose a more capable or faster model depending on the task at hand.

Description: Currently, the claude.yml workflow uses the default model configured in anthropics/claude-code-action@v1. There is no way to override the model per-comment. Adding model selection to the trigger phrase (e.g., @claude opus do something or @claude sonnet-4-6 refine item xxx) would allow per-task model selection without touching the workflow file each time.

Supported shorthand aliases should map to full Anthropic model IDs:

Alias Model ID
opus claude-opus-4-6
opus-4-6 claude-opus-4-6
sonnet claude-sonnet-4-6
sonnet-4-6 claude-sonnet-4-6

Matching is case-insensitive (e.g., @claude Opus, @claude SONNET all work).

The workflow needs to:

  1. Parse the trigger comment body with a regex to detect an optional model hint immediately after @claude
  2. Map the alias to the full model ID
  3. Pass the resolved model to the action via claude_args: '--model <id>'
  4. Fall back to claude-sonnet-4-6 when no alias is present

Scope Decisions:

  • Model hint is positional: @claude <model-alias> <rest of instruction>
  • Unrecognised tokens after @claude are treated as part of the instruction (no error), keeping backwards compatibility
  • Only well-known shorthand aliases are mapped; arbitrary model IDs are not passed through (security/typo guard)
  • Default model is claude-sonnet-4-6 (sonnet)

Acceptance Criteria:

  • @claude opus <task> runs Claude with claude-opus-4-6
  • @claude sonnet <task> runs Claude with claude-sonnet-4-6
  • @claude <task> (no alias) falls back to claude-sonnet-4-6
  • Alias matching is case-insensitive
  • Unrecognised token after @claude is ignored and treated as part of the instruction
  • Workflow change documented in commit message referencing SC-019

← Back to Backlog