File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -226,15 +226,23 @@ func NewRunCommand() *cobra.Command {
226
226
modelName = args [0 ]
227
227
}
228
228
229
+ noMatchErrorMessage := "The specified model name is not found. Run 'gh models list' to see available models or 'gh models run' to select interactively."
230
+
231
+ if modelName == "" {
232
+ return errors .New (noMatchErrorMessage )
233
+ }
234
+
235
+ foundMatch := false
229
236
for _ , model := range models {
230
237
if strings .EqualFold (model .FriendlyName , modelName ) || strings .EqualFold (model .Name , modelName ) {
231
238
modelName = model .Name
239
+ foundMatch = true
232
240
break
233
241
}
234
242
}
235
243
236
- if modelName == "" {
237
- return errors .New ("the specified model name is not supported" )
244
+ if ! foundMatch {
245
+ return errors .New (noMatchErrorMessage )
238
246
}
239
247
240
248
initialPrompt := ""
You can’t perform that action at this time.
0 commit comments