on main help sign in
fix: properly follow the `Assisted-by` header spec (#2871)

We were not using the correct format. According to the SPEC it should be: Assisted-by: AGENT_NAME:MODEL_VERSION So now it'll look like this: Assisted-by: Crush:kimi-k2.6 See: https://docs.kernel.org/process/coding-assistants.html#attribution

commit24da509486e374024e9a03d27aab26bfdeef9cc8 authorAndrey Nering <andreynering@users.noreply.github.com> dateMon 11 May 2026, 17:23 (5 months ago) parent1d42341
4 files changed+10−11
README.md+1−2 internal/agent/coordinator.go+3−3 internal/agent/tools/bash.go+5−5 internal/agent/tools/bash.tpl+1−1
README.md+1−2
@@ -548,8 +548,7 @@ it creates. You can customize this behavior with the `attribution` option:
548548
549549- `trailer_style`: Controls the attribution trailer added to commit messages
550550 (default: `assisted-by`)
551− - `assisted-by`: Adds `Assisted-by: [Model Name] via Crush <crush@charm.land>`
552− (includes the model name)
551+ - `assisted-by`: Adds `Assisted-by: Crush:[ModelID]` as specified in [the convention](https://docs.kernel.org/process/coding-assistants.html#attribution)
553552 - `co-authored-by`: Adds `Co-Authored-By: Crush <crush@charm.land>`
554553 - `none`: No attribution trailer
555554- `generated_with`: When true (default), adds `💘 Generated with Crush` line to
internal/agent/coordinator.go+3−3
@@ -458,10 +458,10 @@ func (c *coordinator) buildTools(ctx context.Context, agent config.Agent, isSubA
458458 }
459459
460460 // Get the model name for the agent
461− modelName := ""
461+ modelID := ""
462462 if modelCfg, ok := c.cfg.Config().Models[agent.Model]; ok {
463463 if model := c.cfg.Config().GetModel(modelCfg.Provider, modelCfg.Model); model != nil {
464− modelName = model.Name
464+ modelID = model.ID
465465 }
466466 }
467467
@@ -474,7 +474,7 @@ func (c *coordinator) buildTools(ctx context.Context, agent config.Agent, isSubA
474474 }
475475
476476 allTools = append(allTools,
477− tools.NewBashTool(c.permissions, c.cfg.WorkingDir(), c.cfg.Config().Options.Attribution, modelName),
477+ tools.NewBashTool(c.permissions, c.cfg.WorkingDir(), c.cfg.Config().Options.Attribution, modelID),
478478 tools.NewCrushInfoTool(c.cfg, c.lspManager, c.allSkills, c.activeSkills, c.skillTracker),
479479 tools.NewCrushLogsTool(logFile),
480480 tools.NewJobOutputTool(),
internal/agent/tools/bash.go+5−5
@@ -65,7 +65,7 @@ type bashDescriptionData struct {
6565 BannedCommands string
6666 MaxOutputLength int
6767 Attribution config.Attribution
68− ModelName string
68+ ModelID string
6969}
7070
7171var bannedCommands = []string{
@@ -141,14 +141,14 @@ var bannedCommands = []string{
141141 "ufw",
142142}
143143
144−func bashDescription(attribution *config.Attribution, modelName string) string {
144+func bashDescription(attribution *config.Attribution, modelID string) string {
145145 bannedCommandsStr := strings.Join(bannedCommands, ", ")
146146 var out bytes.Buffer
147147 if err := bashDescriptionTpl.Execute(&out, bashDescriptionData{
148148 BannedCommands: bannedCommandsStr,
149149 MaxOutputLength: MaxOutputLength,
150150 Attribution: *attribution,
151− ModelName: modelName,
151+ ModelID: modelID,
152152 }); err != nil {
153153 // this should never happen.
154154 panic("failed to execute bash description template: " + err.Error())
@@ -188,10 +188,10 @@ func blockFuncs() []shell.BlockFunc {
188188 }
189189}
190190
191−func NewBashTool(permissions permission.Service, workingDir string, attribution *config.Attribution, modelName string) fantasy.AgentTool {
191+func NewBashTool(permissions permission.Service, workingDir string, attribution *config.Attribution, modelID string) fantasy.AgentTool {
192192 return fantasy.NewAgentTool(
193193 BashToolName,
194− string(bashDescription(attribution, modelName)),
194+ string(bashDescription(attribution, modelID)),
195195 func(ctx context.Context, params BashParams, call fantasy.ToolCall) (fantasy.ToolResponse, error) {
196196 if params.Command == "" {
197197 return fantasy.NewTextErrorResponse("missing command"), nil
internal/agent/tools/bash.tpl+1−1
@@ -69,7 +69,7 @@ When user asks to create git commit:
6969{{ end}}
7070{{if eq .Attribution.TrailerStyle "assisted-by" }}
7171
72− Assisted-by: {{ .ModelName }} via Crush <crush@charm.land>
72+ Assisted-by: Crush:{{ .ModelID }}
7373{{ else if eq .Attribution.TrailerStyle "co-authored-by" }}
7474
7575 Co-Authored-By: Crush <crush@charm.land>