Support dynamic variables in attribution settings (e.g. model name)

Resolved 💬 3 comments Opened Mar 10, 2026 by eulercb Closed Apr 10, 2026

Feature Request

Problem

The attribution.commit and attribution.pr settings only support static strings. When using multiple models (e.g., switching between Opus and Sonnet), there's no way to automatically include the current model name in commit trailers or PR descriptions.

For example, setting:

"attribution": {
  "commit": "Co-Authored-By: claude-opus-4-6 <noreply@anthropic.com>"
}

...works, but it won't update when switching to a different model. You'd have to manually edit the setting each time.

Proposed Solution

Support dynamic variable substitution in attribution settings. For example:

"attribution": {
  "commit": "Co-Authored-By: ${MODEL_NAME} <noreply@anthropic.com>",
  "pr": "Generated with ${MODEL_NAME} via Claude Code"
}

Suggested variables:

  • ${MODEL_NAME} or ${MODEL} — the current model ID (e.g., claude-opus-4-6, claude-sonnet-4-6)
  • ${MODEL_SHORT} — a shorter display name (e.g., Opus 4.6, Sonnet 4.6)

Use Case

Teams and individuals who use multiple Claude models want to track which model generated each commit for auditing, performance comparison, and transparency purposes. This is especially relevant as more models become available and users frequently switch between them.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗