@@ -63,6 +63,7 @@ type bashDescriptionData struct {
6363 BannedCommands string
6464 MaxOutputLength int
6565 Attribution config.Attribution
66+ ModelName string
6667}
6768
6869var bannedCommands = []string{
@@ -138,13 +139,14 @@ var bannedCommands = []string{
138139 "ufw",
139140}
140141
141−func bashDescription(attribution *config.Attribution) string {
142+func bashDescription(attribution *config.Attribution, modelName string) string {
142143 bannedCommandsStr := strings.Join(bannedCommands, ", ")
143144 var out bytes.Buffer
144145 if err := bashDescriptionTpl.Execute(&out, bashDescriptionData{
145146 BannedCommands: bannedCommandsStr,
146147 MaxOutputLength: MaxOutputLength,
147148 Attribution: *attribution,
149+ ModelName: modelName,
148150 }); err != nil {
149151 // this should never happen.
150152 panic("failed to execute bash description template: " + err.Error())
@@ -184,10 +186,10 @@ func blockFuncs() []shell.BlockFunc {
184186 }
185187}
186188
187−func NewBashTool(permissions permission.Service, workingDir string, attribution *config.Attribution) fantasy.AgentTool {
189+func NewBashTool(permissions permission.Service, workingDir string, attribution *config.Attribution, modelName string) fantasy.AgentTool {
188190 return fantasy.NewAgentTool(
189191 BashToolName,
190− string(bashDescription(attribution)),
192+ string(bashDescription(attribution, modelName)),
191193 func(ctx context.Context, params BashParams, call fantasy.ToolCall) (fantasy.ToolResponse, error) {
192194 if params.Command == "" {
193195 return fantasy.NewTextErrorResponse("missing command"), nil